pub enum InvalidCodepoint {
Utf16Reserved,
TooHigh,
}
Expand description
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).
Implementations§
Source§impl InvalidCodepoint
impl InvalidCodepoint
Sourcepub fn error_range(self) -> (u32, u32)
pub fn error_range(self) -> (u32, u32)
Get the range of values for which this error would be given.
Trait Implementations§
Source§impl Clone for InvalidCodepoint
impl Clone for InvalidCodepoint
Source§fn clone(&self) -> InvalidCodepoint
fn clone(&self) -> InvalidCodepoint
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InvalidCodepoint
impl Debug for InvalidCodepoint
Source§impl Display for InvalidCodepoint
impl Display for InvalidCodepoint
Source§impl Error for InvalidCodepoint
impl Error for InvalidCodepoint
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 From<InvalidCodepoint> for InvalidUtf8Array
impl From<InvalidCodepoint> for InvalidUtf8Array
Source§fn from(error: InvalidCodepoint) -> InvalidUtf8Array
fn from(error: InvalidCodepoint) -> InvalidUtf8Array
Converts to this type from the input type.
Source§impl From<InvalidCodepoint> for InvalidUtf8Slice
impl From<InvalidCodepoint> for InvalidUtf8Slice
Source§fn from(error: InvalidCodepoint) -> InvalidUtf8Slice
fn from(error: InvalidCodepoint) -> InvalidUtf8Slice
Converts to this type from the input type.
Source§impl PartialEq for InvalidCodepoint
impl PartialEq for InvalidCodepoint
impl Copy for InvalidCodepoint
impl Eq for InvalidCodepoint
impl StructuralPartialEq for InvalidCodepoint
Auto Trait Implementations§
impl Freeze for InvalidCodepoint
impl RefUnwindSafe for InvalidCodepoint
impl Send for InvalidCodepoint
impl Sync for InvalidCodepoint
impl Unpin for InvalidCodepoint
impl UnwindSafe for InvalidCodepoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)