pub struct RenderSession { /* private fields */ }Expand description
Opaque, backend-backed iterative render session.
Implementations§
Source§impl RenderSession
impl RenderSession
Sourcepub fn with_warnings(self, warnings: Vec<Diagnostic>) -> Self
pub fn with_warnings(self, warnings: Vec<Diagnostic>) -> Self
Attach session-level warnings, surfaced by RenderSession::warnings
and appended to RenderResult::warnings on every
RenderSession::render call.
A Backend chains this onto the session it returns
from open to carry non-fatal open-time diagnostics. The built-in Typst
backend emits none, so the channel stays empty unless a backend opts in.
pub fn page_count(&self) -> usize
Sourcepub fn warnings(&self) -> &[Diagnostic]
pub fn warnings(&self) -> &[Diagnostic]
Session-level warnings attached at Backend::open time, also appended
to RenderResult::warnings on each RenderSession::render call.
Exposed for consumers (e.g. canvas previews) that never call render().
pub fn render(&self, opts: &RenderOptions) -> Result<RenderResult, RenderError>
Auto Trait Implementations§
impl !RefUnwindSafe for RenderSession
impl !UnwindSafe for RenderSession
impl Freeze for RenderSession
impl Send for RenderSession
impl Sync for RenderSession
impl Unpin for RenderSession
impl UnsafeUnpin for RenderSession
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