Enum text_layout::Item
source · pub enum Item {
Box {
width: f32,
},
Glue {
width: f32,
stretch: f32,
shrink: f32,
},
Penalty {
width: f32,
cost: f32,
flagged: bool,
},
}Expand description
A single item in a paragraph.
Variants§
Box
An unbreakable box containing paragraph content. Typically represents a glyph or sequence of glyphs. Lines may not be broken at boxes.
Glue
Fields
Whitespace that separates boxes. Lines may be broken at glue items.
Penalty
Fields
A penalty item. Represents a possible breakpoint with a particular aesthetic cost that indicates the desirability or undesirability of such a breakpoint.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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