pub enum Utf16TupleError {
FirstIsTrailingSurrogate,
SuperfluousSecond,
MissingSecond,
SecondIsNotTrailingSurrogate,
}
Expand description
Error returned when one or two u16
s are not valid UTF-16.
They are returned in sinking precedence; The condition that causes the first variant to be returned is checked for before the condition the next variant is returned for.
Variants§
FirstIsTrailingSurrogate
The first unit is a trailing / low surrogate, which is never valid.
SuperfluousSecond
The provided second unit is not necessary.
MissingSecond
The first and only unit requires a second unit.
SecondIsNotTrailingSurrogate
The second unit is needed and was provided, but is not a trailing surrogate.
Trait Implementations§
Source§impl Clone for Utf16TupleError
impl Clone for Utf16TupleError
Source§fn clone(&self) -> Utf16TupleError
fn clone(&self) -> Utf16TupleError
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 Utf16TupleError
impl Debug for Utf16TupleError
Source§impl Display for Utf16TupleError
impl Display for Utf16TupleError
Source§impl Error for Utf16TupleError
impl Error for Utf16TupleError
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 Utf16TupleError
impl PartialEq for Utf16TupleError
impl Copy for Utf16TupleError
impl Eq for Utf16TupleError
impl StructuralPartialEq for Utf16TupleError
Auto Trait Implementations§
impl Freeze for Utf16TupleError
impl RefUnwindSafe for Utf16TupleError
impl Send for Utf16TupleError
impl Sync for Utf16TupleError
impl Unpin for Utf16TupleError
impl UnwindSafe for Utf16TupleError
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