Expand description
Constructors for the two wire request bodies.
RenderMarkdownRequest and RenderTemplateRequest are plain serde
structs in mdcast-api with no Default (markdown and target are not
optional), so building one by hand means naming every field. These give the
common case one expression; everything else is a struct-update:
use mdcast_client::request;
use mdcast_api::{Target, wire::RenderOptions};
let mut req = request::markdown("# Q3", Target::Pdf);
req.options = RenderOptions {
mermaid: true,
toc_depth: Some(2),
..RenderOptions::default()
};The assets manifest is deliberately left empty: the client fills it from
the crate::AssetBundle handed to the render call.