ParagraphLayout

Trait ParagraphLayout 

Source
pub trait ParagraphLayout<Box = (), Glue = (), Penalty = (), N: Num = f32> {
    // Required method
    fn layout_paragraph(
        &self,
        items: &[Item<Box, Glue, Penalty, N>],
        line_width: N,
    ) -> Vec<Line<N>>;
}
Expand description

Represents a paragraph layout algorithm

Required Methods§

Source

fn layout_paragraph( &self, items: &[Item<Box, Glue, Penalty, N>], line_width: N, ) -> Vec<Line<N>>

Lays out a paragraph with the given line width that consists of as list of items and returns the laid-out lines.

Implementors§

Source§

impl<Box, Glue, Penalty, N: Num> ParagraphLayout<Box, Glue, Penalty, N> for FirstFit<N>

Source§

impl<Box, Glue, Penalty, N: Num> ParagraphLayout<Box, Glue, Penalty, N> for KnuthPlass<N>