TextHighlightMerge
struct · ferroui-controls · v0.5.0
struct TextHighlightMerge
Splits overlapping layers into ordered, disjoint regions.
Later additions replace the complete foreground/background pair. Selection therefore has highest priority when a view adds it after its highlighters. Adjacent regions remain separate, matching the source merge algorithm.
Members
new
fn new() -> Self
from_regions
fn from_regions(regions: impl IntoIterator<Item = TextHighlightRegion>) -> Self
merge
fn merge(self: &mut Self, region: TextHighlightRegion)
add_region
fn add_region(self: &mut Self, region: TextHighlightRegion)
iter
fn iter(self: &Self) -> impl DoubleEndedIterator<Item = &TextHighlightRegion> + ExactSizeIterator
regions
fn regions(self: &Self) -> Vec<TextHighlightRegion>
into_regions
fn into_regions(self: Self) -> Vec<TextHighlightRegion>
is_empty
fn is_empty(self: &Self) -> bool
len
fn len(self: &Self) -> usize
clear
fn clear(self: &mut Self)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsErasedDestructorIntoEitherCloneDebugDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.