pub trait WispTextLayout:
Debug
+ Send
+ Sync {
// Required method
fn metrics(&self) -> WispTextMetrics;
}Expand description
A laid-out piece of text — ready to be rendered.
Backends return their own concrete layout type (e.g. an
AtlasLayout of glyph instances, or a Cosmic Text Buffer),
hidden behind this trait. The renderer reads metrics() for
composition decisions (sizing the RT in M-TEXT.5, fitting captions
in M-TEXT.9) and downcasts to the backend type via the
engine/renderer pair.
Required Methods§
Sourcefn metrics(&self) -> WispTextMetrics
fn metrics(&self) -> WispTextMetrics
Per-layout metrics.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".