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).
Members
new
const fn new(first_character_index: i32) -> Self
Creates a hit on the leading edge of the character at first_character_index.
with_trailing_length
const fn with_trailing_length(first_character_index: i32, trailing_length: i32) -> Self
Creates a hit with a trailing length.
first_character_index
const fn first_character_index(self: &Self) -> i32
Gets the index of the first character that got hit.
trailing_length
const fn trailing_length(self: &Self) -> i32
Gets the trailing length value for the character that got hit.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeResourceKeyObjectPropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneCopyDebugDefaultStructuralPartialEqPartialEqEqHash
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.