FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CharacterHit

    struct · ferroui-base · v0.5.0

    struct CharacterHit
    

    Represents information about a character hit within a glyph run.

    The CharacterHit structure provides information about the index of the first character that got hit as well as information about leading or trailing edge.

    Indices and lengths are UTF-16 code units (see the index-unit note in media/text_formatting/mod.rs).

    View source

    Members

    new

    const fn new(first_character_index: i32) -> Self
    

    Creates a hit on the leading edge of the character at first_character_index.

    Source

    with_trailing_length

    const fn with_trailing_length(first_character_index: i32, trailing_length: i32) -> Self
    

    Creates a hit with a trailing length.

    Source

    first_character_index

    const fn first_character_index(self: &Self) -> i32
    

    Gets the index of the first character that got hit.

    Source

    trailing_length

    const fn trailing_length(self: &Self) -> i32
    

    Gets the trailing length value for the character that got hit.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ResourceKeyObject
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • Default
    • StructuralPartialEq
    • PartialEq
    • Eq
    • Hash

    Availability

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