Enum futf::Meaning [−][src]
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
Whole(char)
We found a whole codepoint.
LeadSurrogate(u16)
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.
TrailSurrogate(u16)
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.
Prefix(usize)
We found only a prefix of a codepoint before the buffer ended.
Includes the number of additional bytes needed.
Suffix
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 Copy for Meaning
impl Clone for Meaning
[src]
impl Clone for Meaning
fn clone(&self) -> Meaning
[src]
fn clone(&self) -> Meaning
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Meaning
[src]
impl PartialEq for Meaning
fn eq(&self, other: &Meaning) -> bool
[src]
fn eq(&self, other: &Meaning) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Meaning) -> bool
[src]
fn ne(&self, other: &Meaning) -> bool
This method tests for !=
.
impl Eq for Meaning
[src]
impl Eq for Meaning
impl PartialOrd for Meaning
[src]
impl PartialOrd for Meaning
fn partial_cmp(&self, other: &Meaning) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Meaning) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Meaning) -> bool
[src]
fn lt(&self, other: &Meaning) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Meaning) -> bool
[src]
fn le(&self, other: &Meaning) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Meaning) -> bool
[src]
fn gt(&self, other: &Meaning) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Meaning) -> bool
[src]
fn ge(&self, other: &Meaning) -> bool
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]
impl Ord for Meaning
fn cmp(&self, other: &Meaning) -> Ordering
[src]
fn cmp(&self, other: &Meaning) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Debug for Meaning
[src]
impl Debug for Meaning
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for Meaning
[src]
impl Hash for Meaning