Enum bincode::error::EncodeError [−][src]
#[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,
},
SequenceMustHaveLength,
}Expand description
Errors that can be encountered by encoding a type
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
The writer ran out of storage.
The RefCell
Fields of RefCellAlreadyBorrowed
inner: BorrowErrorThe inner borrow error
type_name: &'static strthe type name of the RefCell being encoded that is currently borrowed.
Other(&'static str)An uncommon error occured, see the inner text for more information
Tuple Fields of Other
0: &'static strOtherString(String)An uncommon error occured, see the inner text for more information
Tuple Fields of OtherString
0: StringA std::path::Path was being encoded but did not contain a valid &str representation
The targetted writer encountered an std::io::Error
Fields of Io
The encoder tried to encode a Mutex or RwLock, but the locking failed
Fields of LockFailed
type_name: &'static strThe type name of the mutex for debugging purposes
The encoder tried to encode a SystemTime, but it was before SystemTime::UNIX_EPOCH
Fields of InvalidSystemTime
inner: SystemTimeErrorThe error that was thrown by the SystemTime
time: SystemTimeThe SystemTime that caused the error
Serde provided bincode with a sequence without a length, which is not supported in bincode