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>,
},
Serde(EncodeError),
}
Expand description
Errors that can be encountered by encoding a type
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
UnexpectedEnd
The writer ran out of storage.
RefCellAlreadyBorrowed
Fields
inner: BorrowError
The inner borrow error
type_name: &'static str
the type name of the RefCell being encoded that is currently borrowed.
The RefCell
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
Fields
inner: Error
The encountered error
index: usize
The amount of bytes that were written before the error occurred
The targeted writer encountered an std::io::Error
LockFailed
Fields
type_name: &'static str
The type name of the mutex for debugging purposes
The encoder tried to encode a Mutex
or RwLock
, but the locking failed
InvalidSystemTime
Fields
inner: SystemTimeError
The error that was thrown by the SystemTime
time: Box<SystemTime>
The SystemTime that caused the error
The encoder tried to encode a SystemTime
, but it was before SystemTime::UNIX_EPOCH
Serde(EncodeError)
A serde-specific error that occurred while decoding.
Trait Implementations
sourceimpl Debug for EncodeError
impl Debug for EncodeError
sourceimpl Display for EncodeError
impl Display for EncodeError
sourceimpl Error for EncodeError
impl Error for EncodeError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
sourceimpl Error for EncodeError
Available on crate feature serde
only.
impl Error for EncodeError
serde
only.sourceimpl Into<EncodeError> for EncodeError
Available on crate feature serde
only.
impl Into<EncodeError> for EncodeError
serde
only.