pub struct ValidateError { /* private fields */ }
Expand description
An error encountered while validating a byte stream for a certain encoding.
Implementations§
Source§impl ValidateError
impl ValidateError
Sourcepub fn valid_up_to(&self) -> usize
pub fn valid_up_to(&self) -> usize
The length of valid data in the byte stream before the error was encountered. Data up to
this point may be passed to Str::from_bytes_unchecked
soundly.
Sourcepub fn error_len(&self) -> Option<usize>
pub fn error_len(&self) -> Option<usize>
The length of the error, or None if it occurred at the end of the stream. If Some
,
decoding may skip this many bytes forward, replacing it with a substitution character,
and continue decoding from that point. If None
, all remaining data in the stream is
invalid. If decoding chunked data, it may represent a cut-off character.
Trait Implementations§
Source§impl Clone for ValidateError
impl Clone for ValidateError
Source§fn clone(&self) -> ValidateError
fn clone(&self) -> ValidateError
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 ValidateError
impl Debug for ValidateError
Source§impl Display for ValidateError
impl Display for ValidateError
Source§impl Error for ValidateError
impl Error for ValidateError
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
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for ValidateError
impl PartialEq for ValidateError
impl StructuralPartialEq for ValidateError
Auto Trait Implementations§
impl Freeze for ValidateError
impl RefUnwindSafe for ValidateError
impl Send for ValidateError
impl Sync for ValidateError
impl Unpin for ValidateError
impl UnwindSafe for ValidateError
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