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> PartialOrd for Codepoint<'a>
impl<'a> PartialOrd for Codepoint<'a>
impl<'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