LogicalTextRunEnumerator
struct · ferroui-base · v0.5.0
struct LogicalTextRunEnumerator<'a>
Walks the runs of a TextLine in logical (source-text) order. This
is the order that splits and length-based offsets are defined in, and is
what every TextCollapsingProperties::collapse implementation needs to
see — unlike TextLine::text_runs, which exposes the post-BiDi visual
ordering used for rendering.
When the line has been finalized (the normal case after
TextLineImpl::finalize_line), the enumerator iterates over the indexed
text runs — a level-resolved table that maps each run back to its original
logical position. If the line hasn't been finalized (or the line is not a
TextLineImpl), it falls back to the raw TextLine::text_runs list.
Internal upstream; public so that the Skia unit tests reach it.
Members
new
fn new(line: &'a dyn TextLine) -> Self
with_direction
fn with_direction(line: &'a dyn TextLine, backward: bool) -> Self
count
fn count(self: &Self) -> i32
The number of runs.
move_next
fn move_next(self: &mut Self) -> Option<Rc<dyn TextRun>>
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.