Enum encode_unicode::error::CodepointError
source · [−]pub enum CodepointError {
Utf16Reserved,
TooHigh,
}
Expand description
Error returned when an u32
is not a valid unicode codepoint.
Variants
Utf16Reserved
It’s reserved for UTF-16 surrogate pairs.
TooHigh
It’s higher than the highest codepoint (which is 0x10ffff).
Implementations
sourceimpl CodepointError
impl CodepointError
sourcepub const fn error_range(self) -> RangeInclusive<u32>
pub const fn error_range(self) -> RangeInclusive<u32>
Get the range of values for which this error would be given.
Trait Implementations
sourceimpl Clone for CodepointError
impl Clone for CodepointError
sourcefn clone(&self) -> CodepointError
fn clone(&self) -> CodepointError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CodepointError
impl Debug for CodepointError
sourceimpl Display for CodepointError
impl Display for CodepointError
sourceimpl Error for CodepointError
impl Error for CodepointError
sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl PartialEq<CodepointError> for CodepointError
impl PartialEq<CodepointError> for CodepointError
impl Copy for CodepointError
impl Eq for CodepointError
impl StructuralEq for CodepointError
impl StructuralPartialEq for CodepointError
Auto Trait Implementations
impl RefUnwindSafe for CodepointError
impl Send for CodepointError
impl Sync for CodepointError
impl Unpin for CodepointError
impl UnwindSafe for CodepointError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more