pub struct RenderTemplateRequest {
pub template_source: String,
pub data: String,
pub meta: DocMeta,
pub brand: Option<BrandSpec>,
pub format: TemplateFormat,
pub assets: AssetManifest,
}Expand description
Render a user-supplied typst template over structured data — the
render-template path (TemplateDoc), which bypasses ResolvedDoc
entirely.
Fields§
§template_source: StringTypst source of the main template. Inline source rather than
TemplateDoc.template’s provider key: the server has no view of the
caller’s filesystem, and the template is the one file a caller always
authors itself.
data: StringThe JSON document the template reads with json("/data.json"),
carried verbatim as text. A string, not a parsed value, so this crate
needs no JSON implementation of its own — the bytes go straight into
the virtual /data.json.
meta: DocMeta§brand: Option<BrandSpec>§format: TemplateFormat§assets: AssetManifestSibling files the template #imports or #images, under the provider
keys it references them by.
Trait Implementations§
Source§impl Clone for RenderTemplateRequest
impl Clone for RenderTemplateRequest
Source§fn clone(&self) -> RenderTemplateRequest
fn clone(&self) -> RenderTemplateRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderTemplateRequest
impl Debug for RenderTemplateRequest
Source§impl<'de> Deserialize<'de> for RenderTemplateRequest
impl<'de> Deserialize<'de> for RenderTemplateRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RenderTemplateRequest
Source§impl PartialEq for RenderTemplateRequest
impl PartialEq for RenderTemplateRequest
Source§impl Serialize for RenderTemplateRequest
impl Serialize for RenderTemplateRequest
impl StructuralPartialEq for RenderTemplateRequest
Auto Trait Implementations§
impl Freeze for RenderTemplateRequest
impl RefUnwindSafe for RenderTemplateRequest
impl Send for RenderTemplateRequest
impl Sync for RenderTemplateRequest
impl Unpin for RenderTemplateRequest
impl UnsafeUnpin for RenderTemplateRequest
impl UnwindSafe for RenderTemplateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more