LineBreakEnumerator
struct · ferroui-base · v0.5.0
struct LineBreakEnumerator<'a>
Enumerates the line break opportunities of UTF-16 text (UAX #14).
Members
new
fn new(text: &'a [u16]) -> Self
text
const fn text(self: &Self) -> &'a [u16]
The text being enumerated (a public field upstream).
move_next
fn move_next(self: &mut Self) -> Option<LineBreak>
Moves to the next LineBreak; returns None when there are no more.
first_required
fn first_required(text: &[u16]) -> Option<LineBreak>
The first required break of text: the first break the enumerator gives whose
LineBreak::required is set, found without the rules. A break is required after a hard
line break only (classes BK, CR, LF and NL: U+000A to U+000D, U+0085, U+2028 and U+2029;
CR LF breaks once, after the LF), so the text is scanned for those characters; a text
without one has no required break (the break at the end of such a text is not required).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyIntoIteratorToOwnedErasedDestructorIntoEitherCloneDebugIterator
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.