Skip to main content

Platform

Trait Platform 

Source
pub trait Platform {
    // Required method
    fn diagnostics(&self) -> &dyn DiagnosticSink;

    // Provided methods
    fn limits(&self) -> HostLimits { ... }
    fn clock(&self) -> HostClock { ... }
    fn linebreak_start(&self, _request: LinebreakRequest<'_>) { ... }
    fn linebreak_next(&self) -> Option<i32> { ... }
}
Expand description

Host runtime services that must remain separate from engine semantics.

Required Methods§

Source

fn diagnostics(&self) -> &dyn DiagnosticSink

Returns the diagnostic sink for this platform.

Provided Methods§

Source

fn limits(&self) -> HostLimits

Returns host resource limits, defaulting to HostLimits::default().

Source

fn clock(&self) -> HostClock

Deterministic clock value visible to generated TeX code.

Source

fn linebreak_start(&self, _request: LinebreakRequest<'_>)

Called before the engine begins line break iteration for a paragraph.

Source

fn linebreak_next(&self) -> Option<i32>

Returns the next line break position, or None to use the built in algorithm.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Platform for &T
where T: Platform,

Implementors§