pub struct EncodingError { /* private fields */ }Expand description
Implementations§
Source§impl EncodingError
impl EncodingError
Sourcepub fn valid_up_to(&self) -> usize
pub fn valid_up_to(&self) -> usize
Sourcepub fn error_len(&self) -> Option<NonZeroU8>
pub fn error_len(&self) -> Option<NonZeroU8>
Provides more information about the failure:
None: the end of the input was reached unexpectedly.self.valid_up_to()is 1 to 6 bytes from the end of the input. If a byte stream (such as a file or network socket) is being decoded incrementally, this could be a validcharwhose UTF-8 byte sequence is spanning multiple chunks.Some(len): an unexpected byte was encountered. The length provided is that of the invalid byte seqence that starts at the index given byvalid_up_to().
Trait Implementations§
Source§impl Clone for EncodingError
impl Clone for EncodingError
Source§fn clone(&self) -> EncodingError
fn clone(&self) -> EncodingError
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 Debug for EncodingError
impl Debug for EncodingError
Source§impl Display for EncodingError
impl Display for EncodingError
Source§impl PartialEq for EncodingError
impl PartialEq for EncodingError
impl Copy for EncodingError
impl Eq for EncodingError
impl StructuralPartialEq for EncodingError
Auto Trait Implementations§
impl Freeze for EncodingError
impl RefUnwindSafe for EncodingError
impl Send for EncodingError
impl Sync for EncodingError
impl Unpin for EncodingError
impl UnwindSafe for EncodingError
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