FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    from_regions

    fn from_regions(regions: impl IntoIterator<Item = TextHighlightRegion>) -> Self
    

    Source

    merge

    fn merge(self: &mut Self, region: TextHighlightRegion)
    

    Source

    add_region

    fn add_region(self: &mut Self, region: TextHighlightRegion)
    

    Source

    iter

    fn iter(self: &Self) -> impl DoubleEndedIterator<Item = &TextHighlightRegion> + ExactSizeIterator
    

    Source

    regions

    fn regions(self: &Self) -> Vec<TextHighlightRegion>
    

    Source

    into_regions

    fn into_regions(self: Self) -> Vec<TextHighlightRegion>
    

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Source

    len

    fn len(self: &Self) -> usize
    

    Source

    clear

    fn clear(self: &mut Self)
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.