pub struct LayoutEngine { /* private fields */ }Expand description
The main layout engine.
Implementations§
Source§impl LayoutEngine
impl LayoutEngine
pub fn new() -> Self
Sourcepub fn layout(
&self,
document: &Document,
font_context: &FontContext,
) -> Vec<LayoutPage>
pub fn layout( &self, document: &Document, font_context: &FontContext, ) -> Vec<LayoutPage>
Main entry point: lay out a document into pages.
Sourcepub fn measure_min_content_width(
&self,
node: &Node,
style: &ResolvedStyle,
font_context: &FontContext,
) -> f64
pub fn measure_min_content_width( &self, node: &Node, style: &ResolvedStyle, font_context: &FontContext, ) -> f64
Measure the min-content width of a node — the minimum width needed to render without breaking unbreakable words. For Text nodes this is the widest single word; for containers it’s the max of children.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LayoutEngine
impl !RefUnwindSafe for LayoutEngine
impl Send for LayoutEngine
impl !Sync for LayoutEngine
impl Unpin for LayoutEngine
impl UnsafeUnpin for LayoutEngine
impl UnwindSafe for LayoutEngine
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