pub struct EncodingError {
pub kind: EncodingErrorKind,
pub message: String,
}
Expand description
Encoding/decoding error.
Fields§
§kind: EncodingErrorKind
Specific type of error
message: String
Message for the error
Implementations§
Source§impl EncodingError
impl EncodingError
Sourcepub fn new(kind: EncodingErrorKind, message: &str) -> Self
pub fn new(kind: EncodingErrorKind, message: &str) -> Self
Create EncodingError
Sourcepub fn out_of_bounds(message: &str) -> Self
pub fn out_of_bounds(message: &str) -> Self
Helper function for making an out of bounds error
Sourcepub fn invalid_data(message: &str) -> Self
pub fn invalid_data(message: &str) -> Self
Helper function for making an invalid data error
Trait Implementations§
Source§impl Clone for EncodingError
impl Clone for EncodingError
Source§fn clone(&self) -> EncodingError
fn clone(&self) -> EncodingError
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 EncodingError
impl Debug for EncodingError
Source§impl Display for EncodingError
impl Display for EncodingError
Source§impl Error for EncodingError
impl Error for EncodingError
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 From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(e: EncodingError) -> Self
fn from(e: EncodingError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EncodingError
impl PartialEq 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