Skip to main content

Module server

Module server 

Source

Structs§

CreateRequest
JSON body for POST /.mbr/create/{*path}.
CreateResponse
Response for a successful POST /.mbr/create.
EditRequest
JSON body for POST /.mbr/edit/{*path}.
EmbeddedStorage
The repository storage an embedding app hands the server.
FlashcardReviewRequest
JSON body for POST /.mbr/flashcard-review.
FlashcardReviewResponse
Response for a successful POST /.mbr/flashcard-review.
MediaViewerQuery
Query parameters for media viewer routes.
MkdirResponse
Response for a successful POST /.mbr/mkdir.
MoveRequest
JSON body for POST /.mbr/move/{*path}.
MoveResponse
Response for a successful POST /.mbr/move.
Server
ServerConfig
Configuration for initializing a Server instance.
ServerState
SiteJsonCache
The memoized /.mbr/site.json body plus a generation counter.
TaskToggleRequest
JSON body for POST /.mbr/task.
TaskToggleResponse
Response for a successful POST /.mbr/task.
UploadParams
Query parameters for POST /.mbr/upload.
UploadResponse
Response for a successful POST /.mbr/upload.

Functions§

validate_media_path
Validates a media path from a query parameter.
validate_media_path_with_mounts
validate_media_path, also accepting a file inside one of the accepted symlink mounts’ targets (mount_targets, canonical — see mbr_core::vault::Mount). A path with a hidden segment is refused wherever it would resolve.