Enum bincode::error::EncodeError
source · #[non_exhaustive]pub enum EncodeError {
UnexpectedEnd,
RefCellAlreadyBorrowed {
inner: BorrowError,
type_name: &'static str,
},
Other(&'static str),
OtherString(String),
InvalidPathCharacters,
Io {
inner: Error,
index: usize,
},
LockFailed {
type_name: &'static str,
},
InvalidSystemTime {
inner: SystemTimeError,
time: Box<SystemTime>,
},
}
Expand description
Errors that can be encountered by encoding a type
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedEnd
The writer ran out of storage.
RefCellAlreadyBorrowed
The RefCell
Fields
§
inner: BorrowError
The inner borrow error
Other(&'static str)
An uncommon error occurred, see the inner text for more information
OtherString(String)
An uncommon error occurred, see the inner text for more information
InvalidPathCharacters
A std::path::Path
was being encoded but did not contain a valid &str
representation
Io
The targeted writer encountered an std::io::Error
Fields
LockFailed
The encoder tried to encode a Mutex
or RwLock
, but the locking failed
InvalidSystemTime
The encoder tried to encode a SystemTime
, but it was before SystemTime::UNIX_EPOCH
Fields
§
inner: SystemTimeError
The error that was thrown by the SystemTime
§
time: Box<SystemTime>
The SystemTime that caused the error
Trait Implementations§
source§impl Debug for EncodeError
impl Debug for EncodeError
source§impl Display for EncodeError
impl Display for EncodeError
source§impl Error for EncodeError
impl Error for EncodeError
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()
Auto Trait Implementations§
impl Freeze for EncodeError
impl !RefUnwindSafe for EncodeError
impl Send for EncodeError
impl Sync for EncodeError
impl Unpin for EncodeError
impl !UnwindSafe for EncodeError
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