pub trait InlineStyles {
// Required method
fn style(&self, id: NodeId, block: &ParagraphStyle) -> ParagraphStyle;
// Provided methods
fn inline_box(&self, _id: NodeId) -> Option<InlineBox> { ... }
fn generated(&self, _inline: &Inline) -> Generated { ... }
fn call(&self, _note: &Inline) -> Option<(String, ParagraphStyle)> { ... }
}Expand description
Where line layout gets the style of one inline node.
The style tree answers by node id. Inherited answers with the
block’s own style, which is what a run of uniform text needs and
what a caller with no tree in hand can supply.
Required Methods§
Sourcefn style(&self, id: NodeId, block: &ParagraphStyle) -> ParagraphStyle
fn style(&self, id: NodeId, block: &ParagraphStyle) -> ParagraphStyle
The style of id, given the style of the block it sits in.
Provided Methods§
Sourcefn inline_box(&self, _id: NodeId) -> Option<InlineBox>
fn inline_box(&self, _id: NodeId) -> Option<InlineBox>
The box the inline element id paints around its runs, where
it paints one. Nothing, for a caller with no tree to ask.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".