pub struct CharIndex(/* private fields */);Expand description
A position in the character list (TextPage::chars) — the sequence a
--txt dump emits.
Distinct from TextIndex on purpose: the two sequences disagree. A
control character or an unmapped code is in this one and not the other,
and one character here can become several there. The compiler is asked to
notice instead of the caller.
Implementations§
Trait Implementations§
impl Copy for CharIndex
impl Eq for CharIndex
Source§impl Ord for CharIndex
impl Ord for CharIndex
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for CharIndex
impl PartialOrd for CharIndex
impl StructuralPartialEq for CharIndex
Auto Trait Implementations§
impl Freeze for CharIndex
impl RefUnwindSafe for CharIndex
impl Send for CharIndex
impl Sync for CharIndex
impl Unpin for CharIndex
impl UnsafeUnpin for CharIndex
impl UnwindSafe for CharIndex
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