Struct futf::Codepoint [] [src]

pub struct Codepoint<'a> {
    pub bytes: &'a [u8],
    pub rewind: usize,
    pub meaning: Meaning,
}

Represents a complete or partial UTF-8 codepoint.

Fields

bytes

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

Start of the codepoint in the buffer, expressed as an offset back from idx.

meaning

Meaning of the partial or full codepoint.

Trait Implementations

Derived Implementations

impl<'a> Hash for Codepoint<'a>

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<'a> Debug for Codepoint<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<'a> Ord for Codepoint<'a>

fn cmp(&self, __arg_0: &Codepoint<'a>) -> Ordering

impl<'a> PartialOrd for Codepoint<'a>

fn partial_cmp(&self, __arg_0: &Codepoint<'a>) -> Option<Ordering>

fn lt(&self, __arg_0: &Codepoint<'a>) -> bool

fn le(&self, __arg_0: &Codepoint<'a>) -> bool

fn gt(&self, __arg_0: &Codepoint<'a>) -> bool

fn ge(&self, __arg_0: &Codepoint<'a>) -> bool

impl<'a> Eq for Codepoint<'a>

impl<'a> PartialEq for Codepoint<'a>

fn eq(&self, __arg_0: &Codepoint<'a>) -> bool

fn ne(&self, __arg_0: &Codepoint<'a>) -> bool

impl<'a> Clone for Codepoint<'a>

fn clone(&self) -> Codepoint<'a>

fn clone_from(&mut self, source: &Self)

impl<'a> Copy for Codepoint<'a>