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 {
error: Error,
index: usize,
},
LockFailed {
type_name: &'static str,
},
InvalidSystemTime {
inner: SystemTimeError,
time: 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: BorrowErrorThe inner borrow error
type_name: &'static strthe type name of the RefCell being encoded that is currently borrowed.
The RefCell
Other(&'static str)
An uncommon error occured, see the inner text for more information
OtherString(String)
An uncommon error occured, 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
error: ErrorThe encountered error
index: usizeThe amount of bytes that were written before the error occured
The targetted writer encountered an std::io::Error
LockFailed
Fields
type_name: &'static strThe type name of the mutex for debugging purposes
The encoder tried to encode a Mutex or RwLock, but the locking failed
InvalidSystemTime
Fields
inner: SystemTimeErrorThe error that was thrown by the SystemTime
time: SystemTimeThe 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 occured while decoding.
Trait Implementations
Performs the conversion.