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§
Source§impl 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§
Source§impl Clone for CodepointError
impl Clone for CodepointError
Source§fn clone(&self) -> CodepointError
fn clone(&self) -> CodepointError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CodepointError
Source§impl Debug for CodepointError
impl Debug for CodepointError
Source§impl Display for CodepointError
impl Display for CodepointError
impl Eq for CodepointError
Source§impl Error for CodepointError
Available on crate feature std only.
impl Error for CodepointError
Available on crate feature
std only.Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
Source§impl PartialEq for CodepointError
impl PartialEq for CodepointError
Source§fn eq(&self, other: &CodepointError) -> bool
fn eq(&self, other: &CodepointError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CodepointError
Auto Trait Implementations§
impl Freeze for CodepointError
impl RefUnwindSafe for CodepointError
impl Send for CodepointError
impl Sync for CodepointError
impl Unpin for CodepointError
impl UnsafeUnpin for CodepointError
impl UnwindSafe for CodepointError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more