pub struct LineBreaker { /* private fields */ }Expand description
Pre-collected line-break opportunities for a string.
Because unicode_linebreak::linebreaks() returns an anonymous iterator
type, all break opportunities are collected eagerly into a Vec and
exposed through IntoIterator and an index-based slice accessor.
Each item is (byte_offset, LineBreak) where byte_offset is the
position after the last character of the breakable unit (exclusive end
of the pre-break segment).
Implementations§
Trait Implementations§
Source§impl IntoIterator for LineBreaker
impl IntoIterator for LineBreaker
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