pub struct Renderer { /* private fields */ }Implementations§
Source§impl Renderer
impl Renderer
pub fn new(cfg: RendererConfig<'_>) -> Result<Renderer, RenderError>
Sourcepub fn take_warnings(&self) -> Vec<String>
pub fn take_warnings(&self) -> Vec<String>
Warnings raised since the last call.
Sourcepub fn take_sources(&self) -> Vec<(String, String)>
pub fn take_sources(&self) -> Vec<(String, String)>
(source, table) of every source() called since the last call, in order, each once.
Sourcepub fn set_destination(&self, d: Option<Connection>)
pub fn set_destination(&self, d: Option<Connection>)
Set (or clear) the destination destination.* reads.
Sourcepub fn render(&self, file: &Path, src: &str) -> Result<String, RenderError>
pub fn render(&self, file: &Path, src: &str) -> Result<String, RenderError>
Render src, reporting errors against file.
Sourcepub fn render_with(
&self,
file: &Path,
src: &str,
ctx: Value,
markdown: bool,
) -> Result<String, RenderError>
pub fn render_with( &self, file: &Path, src: &str, ctx: Value, markdown: bool, ) -> Result<String, RenderError>
Render src with ctx’s keys (a map) added to the context (results, outputs). With
markdown, it’s message text: every printed value is escaped for portable Markdown.
Auto Trait Implementations§
impl !Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl !UnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
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