Crate bobashare_web

Source
Expand description

Webserver written with axum which provides a frontend and REST API for bobashare

Modules§

api
Public facing REST API for bobashare
static_routes
Handler to serve static files
views
Frontend views (as opposed to REST API)

Structs§

AppState
A struct that contains all the state and config for bobashare

Enums§

RenderMarkdownWithSyntaxError
Errors for render_markdown_with_syntax_set
StrToDurationError
Error encountered in converting string to duration values with str_to_duration

Constants§

CLASS_STYLE
ClassStyle used for syntect highlighting
HIGHLIGHT_CLASS_PREFIX
Prefix for CSS classes used for syntect highlighting
MARKDOWN_OPTIONS
Options used for pulldown_cmark rendering

Functions§

clamp_expiry
Take the requested expiry, and make sure it’s within the maximum expiry.
render_markdown_with_syntax_set
Render markdown into HTML, including syntax highlighting for code blocks using syntect.
str_to_duration
Take a string with a simple duration format (single number followed by unit) and output a StdDuration. Accepts durations in minutes (m), hours (h), days (d), weeks (w), months (mon), or years (y).