Enum futf::Meaning [] [src]

pub enum Meaning {
    Whole(char),
    LeadSurrogate(u16),
    TrailSurrogate(u16),
    Prefix(usize),
    Suffix,
}

Meaning of a complete or partial UTF-8 codepoint.

Not all checking is performed eagerly. That is, a codepoint Prefix or Suffix may in reality have no valid completion.

Variants

We found a whole codepoint.

We found something that isn't a valid Unicode codepoint, but it would correspond to a UTF-16 leading surrogate code unit, i.e. a value in the range U+D800 - U+DBFF.

The argument is the code unit's 10-bit index within that range.

These are found in UTF-8 variants such as CESU-8 and WTF-8.

We found something that isn't a valid Unicode codepoint, but it would correspond to a UTF-16 trailing surrogate code unit, i.e. a value in the range U+DC00 - U+DFFF.

The argument is the code unit's 10-bit index within that range.

These are found in UTF-8 variants such as CESU-8 and WTF-8.

We found only a prefix of a codepoint before the buffer ended.

Includes the number of additional bytes needed.

We found only a suffix of a codepoint before running off the start of the buffer.

Up to 3 more bytes may be needed.

Trait Implementations

impl Copy for Meaning
[src]

impl Clone for Meaning
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Meaning
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Meaning
[src]

impl PartialOrd for Meaning
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Meaning
[src]

This method returns an Ordering between self and other. Read more

impl Debug for Meaning
[src]

Formats the value using the given formatter.

impl Hash for Meaning
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more