Enum encode_unicode::error::InvalidCodepoint [−][src]
pub enum InvalidCodepoint { Utf16Reserved, TooHigh, }
Reasons why an u32
is not a valid UTF codepoint.
Variants
Utf16Reserved
It's reserved for UTF-16 surrogate pairs."
TooHigh
It's higher than the highest codepoint (which is 0x10ffff).
Methods
impl InvalidCodepoint
[src]
impl InvalidCodepoint
pub fn error_range(self) -> (u32, u32)
[src]
pub fn error_range(self) -> (u32, u32)
Get the range of values for which this error would be given.
Trait Implementations
impl Clone for InvalidCodepoint
[src]
impl Clone for InvalidCodepoint
fn clone(&self) -> InvalidCodepoint
[src]
fn clone(&self) -> InvalidCodepoint
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for InvalidCodepoint
[src]
impl Copy for InvalidCodepoint
impl Debug for InvalidCodepoint
[src]
impl Debug for InvalidCodepoint
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 PartialEq for InvalidCodepoint
[src]
impl PartialEq for InvalidCodepoint
fn eq(&self, other: &InvalidCodepoint) -> bool
[src]
fn eq(&self, other: &InvalidCodepoint) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Eq for InvalidCodepoint
[src]
impl Eq for InvalidCodepoint
impl Error for InvalidCodepoint
[src]
impl Error for InvalidCodepoint
fn description(&self) -> &'static str
[src]
fn description(&self) -> &'static str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
1.0.0
[src]The lower-level cause of this error, if any. Read more
impl Display for InvalidCodepoint
[src]
impl Display for InvalidCodepoint
fn fmt(&self, fmtr: &mut Formatter) -> Result
[src]
fn fmt(&self, fmtr: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<InvalidCodepoint> for InvalidUtf8Array
[src]
impl From<InvalidCodepoint> for InvalidUtf8Array
fn from(error: InvalidCodepoint) -> InvalidUtf8Array
[src]
fn from(error: InvalidCodepoint) -> InvalidUtf8Array
Performs the conversion.
impl From<InvalidCodepoint> for InvalidUtf8Slice
[src]
impl From<InvalidCodepoint> for InvalidUtf8Slice
fn from(error: InvalidCodepoint) -> InvalidUtf8Slice
[src]
fn from(error: InvalidCodepoint) -> InvalidUtf8Slice
Performs the conversion.
Auto Trait Implementations
impl Send for InvalidCodepoint
impl Send for InvalidCodepoint
impl Sync for InvalidCodepoint
impl Sync for InvalidCodepoint