pub enum LineBreak {
Unspecified,
Simple,
Paragraph,
Heading,
}Expand description
How a paragraph is broken into lines. Compose’s LineBreak.
Variants§
Unspecified
No strategy is set. The value comes from an enclosing style and acts like Simple
when no style sets it.
Simple
Fills each line with as many words as fit. Fast, and the wrap changes little while the user edits text.
Paragraph
Spreads the words over the lines to even out their lengths, leaving the last line
free to stay short. Costs more than Simple.
Heading
Spreads the words over all lines, the last one included, for short text such as
titles. Costs more than Simple.
Implementations§
Source§impl LineBreak
impl LineBreak
Sourcepub fn is_specified(self) -> bool
pub fn is_specified(self) -> bool
Returns true unless the value is Unspecified.
Sourcepub fn take_or_else(self, fallback: impl FnOnce() -> Self) -> Self
pub fn take_or_else(self, fallback: impl FnOnce() -> Self) -> Self
Returns self when it is specified, otherwise the value returned by fallback.
Trait Implementations§
impl Copy for LineBreak
impl Eq for LineBreak
impl StructuralPartialEq for LineBreak
Auto Trait Implementations§
impl Forget for LineBreak
impl Freeze for LineBreak
impl Move for LineBreak
impl RefUnwindSafe for LineBreak
impl Send for LineBreak
impl Sync for LineBreak
impl Unpin for LineBreak
impl UnsafeUnpin for LineBreak
impl UnwindSafe for LineBreak
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