pub(crate) enum DecodeError<'a> {
Invalid {
valid_prefix: &'a str,
invalid_sequence: &'a [u8],
},
Incomplete {
valid_prefix: &'a str,
incomplete_suffix: IncompleteUtf8,
},
}Variants§
Invalid
In lossy decoding insert valid_prefix, then "\u{FFFD}",
then call decode() again with remaining_input.
Incomplete
Call the incomplete_suffix.try_to_complete_codepoint method with more input when available.
If no more input is available, this is an invalid byte sequence.
Trait Implementations§
Source§impl<'a> Clone for DecodeError<'a>
impl<'a> Clone for DecodeError<'a>
Source§fn clone(&self) -> DecodeError<'a>
fn clone(&self) -> DecodeError<'a>
Returns a duplicate 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<'a> Debug for DecodeError<'a>
impl<'a> Debug for DecodeError<'a>
impl<'a> Copy for DecodeError<'a>
Auto Trait Implementations§
impl<'a> Freeze for DecodeError<'a>
impl<'a> RefUnwindSafe for DecodeError<'a>
impl<'a> Send for DecodeError<'a>
impl<'a> Sync for DecodeError<'a>
impl<'a> Unpin for DecodeError<'a>
impl<'a> UnsafeUnpin for DecodeError<'a>
impl<'a> UnwindSafe for DecodeError<'a>
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