pub struct Codepoint<'a> {
pub bytes: &'a [u8],
pub rewind: usize,
pub meaning: Meaning,
}
Expand description
Represents a complete or partial UTF-8 codepoint.
Fields§
§bytes: &'a [u8]
The bytes that make up the partial or full codepoint.
For a Suffix
this depends on idx
. We don’t scan forward
for additional continuation bytes after the reverse scan
failed to locate a multibyte sequence start.
rewind: usize
Start of the codepoint in the buffer, expressed as an offset
back from idx
.
meaning: Meaning
Meaning of the partial or full codepoint.
Trait Implementations§
source§impl<'a> Ord for Codepoint<'a>
impl<'a> Ord for Codepoint<'a>
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<'a> PartialEq for Codepoint<'a>
impl<'a> PartialEq for Codepoint<'a>
source§impl<'a> PartialOrd for Codepoint<'a>
impl<'a> PartialOrd for Codepoint<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Copy for Codepoint<'a>
impl<'a> Eq for Codepoint<'a>
impl<'a> StructuralPartialEq for Codepoint<'a>
Auto Trait Implementations§
impl<'a> Freeze for Codepoint<'a>
impl<'a> RefUnwindSafe for Codepoint<'a>
impl<'a> Send for Codepoint<'a>
impl<'a> Sync for Codepoint<'a>
impl<'a> Unpin for Codepoint<'a>
impl<'a> UnwindSafe for Codepoint<'a>
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