Expand description
HTTP wire protocol: the request and response bodies mdcast-server and
mdcast-client exchange. Types only — no transport, no handler logic.
The shape of the exchange:
- The client posts a render request (
RenderMarkdownRequestorRenderTemplateRequest) whosecrate::AssetManifestnames the assets the render needs, by digest — never inline bytes. - If the server holds every digest, it renders and answers with the artifact bytes.
- If it does not, it answers
409 Conflictwith aMissingBlobsError; the client uploads those blobs and retries.BlobCheckRequest/BlobCheckResponselet a client skip a doomed render round-trip and ask up front. - Any other failure answers with an
ErrorResponse.
Separately, GET /v1/capabilities (CapabilitiesResponse) is an
unauthenticated, cacheable read of deployment shape — which targets and
template formats this instance can actually produce, and its upload size
ceiling — so a client can feature-gate its UI before attempting any of
the above.
Re-exports§
pub use blob::BlobCheckRequest;pub use blob::BlobCheckResponse;pub use blob::MissingBlob;pub use blob::MissingBlobsError;pub use capabilities::CapabilitiesResponse;pub use error::ErrorCode;pub use error::ErrorResponse;pub use generated::BoardOptions;pub use generated::BoardTheme;pub use generated::GeneratedAsset;pub use generated::GeneratedSpec;pub use generated::Generator;pub use generated::QrEcLevel;pub use render::RenderMarkdownRequest;pub use render::RenderOptions;pub use render::RenderTemplateRequest;pub use render::TemplateFormat;
Modules§
- blob
- Blob negotiation: the exchange that keeps asset bytes off the render request. A client asks which digests the server is missing, uploads only those, and renders.
- capabilities
GET /v1/capabilitiesresponse body (issue #81) — deployment shape a client can use to feature-gate its UI before it has even wired up credentials, since the route sits outside the bearer gate.- error
- The generic error body every 4xx/5xx other than
409 Conflictcarries.409has its own shape (crate::MissingBlobsError) because a client acts on it rather than reporting it. - generated
- Server-side generated images — QR codes and chess boards — that a template render asks for by content instead of uploading as a blob.
- render
- Render request bodies — one per entry point mdcast exposes: the markdown
pipeline (
mdcast render) and the data-driven typst template pipeline (mdcast render-template).