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§
- Render
Markdown With Syntax Error - Errors for
render_markdown_with_syntax_set
- StrTo
Duration Error - Error encountered in converting string to duration values with
str_to_duration
Constants§
- CLASS_
STYLE ClassStyle
used forsyntect
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).