#[repr(C)]pub struct GraphemeClusterId {
pub source_run: u32,
pub start_byte_in_run: u32,
}Expand description
A stable, logical identifier for a grapheme cluster.
This survives Bidi reordering and line breaking, making it ideal for tracking text positions for selection and cursor logic.
Fields§
§source_run: u32The run_index from the source ContentIndex.
start_byte_in_run: u32The byte index of the start of the cluster in its original StyledRun.
Trait Implementations§
Source§impl Clone for GraphemeClusterId
impl Clone for GraphemeClusterId
Source§fn clone(&self) -> GraphemeClusterId
fn clone(&self) -> GraphemeClusterId
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphemeClusterId
impl Debug for GraphemeClusterId
Source§impl Hash for GraphemeClusterId
impl Hash for GraphemeClusterId
Source§impl Ord for GraphemeClusterId
impl Ord for GraphemeClusterId
Source§fn cmp(&self, other: &GraphemeClusterId) -> Ordering
fn cmp(&self, other: &GraphemeClusterId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GraphemeClusterId
impl PartialEq for GraphemeClusterId
Source§impl PartialOrd for GraphemeClusterId
impl PartialOrd for GraphemeClusterId
impl Copy for GraphemeClusterId
impl Eq for GraphemeClusterId
impl StructuralPartialEq for GraphemeClusterId
Auto Trait Implementations§
impl Freeze for GraphemeClusterId
impl RefUnwindSafe for GraphemeClusterId
impl Send for GraphemeClusterId
impl Sync for GraphemeClusterId
impl Unpin for GraphemeClusterId
impl UnsafeUnpin for GraphemeClusterId
impl UnwindSafe for GraphemeClusterId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more