pub struct LineBreaker { /* private fields */ }Expand description
Line breaker - breaks text into lines
Implementations§
Source§impl LineBreaker
impl LineBreaker
Sourcepub fn with_letter_spacing(self, spacing: Length) -> Self
pub fn with_letter_spacing(self, spacing: Length) -> Self
Set letter spacing for text measurement
Sourcepub fn with_word_spacing(self, spacing: Length) -> Self
pub fn with_word_spacing(self, spacing: Length) -> Self
Set word spacing for text measurement
Sourcepub fn break_into_words(&self, text: &str) -> Vec<String>
pub fn break_into_words(&self, text: &str) -> Vec<String>
Break text into words for line breaking
Sourcepub fn measure_text(&self, text: &str, font_size: Length) -> Length
pub fn measure_text(&self, text: &str, font_size: Length) -> Length
Measure text width using font metrics
Auto Trait Implementations§
impl Freeze for LineBreaker
impl RefUnwindSafe for LineBreaker
impl Send for LineBreaker
impl Sync for LineBreaker
impl Unpin for LineBreaker
impl UnsafeUnpin for LineBreaker
impl UnwindSafe for LineBreaker
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more