Skip to main content

InlineStyles

Trait InlineStyles 

Source
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§

Source

fn style(&self, id: NodeId, block: &ParagraphStyle) -> ParagraphStyle

The style of id, given the style of the block it sits in.

Provided Methods§

Source

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.

Source

fn generated(&self, _inline: &Inline) -> Generated

The text the sheet generates around one inline element. Nothing, for a caller with no sheet to ask.

Source

fn call(&self, _note: &Inline) -> Option<(String, ParagraphStyle)>

The reference of one note, in the style it is set in: the note’s number as the cascade spells it. Nothing, for a caller with no book to number the notes of.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§