pub enum CoreError {
InvalidMagic,
UnsupportedVersion(u8),
UnknownTypeTag(u8),
Crc32Mismatch {
expected: u32,
actual: u32,
},
Decompression(String),
Compression(String),
Serialization(String),
Deserialization(String),
InvalidObjectId(String),
InvalidTreeEntryName(String),
PayloadTooLarge {
size: usize,
max: usize,
},
Io(Error),
}Expand description
Errors returned by core object encoding, IDs, and schema conversion.
Variants§
InvalidMagic
COF bytes did not start with the expected magic prefix.
UnsupportedVersion(u8)
COF bytes use a version this crate cannot read.
UnknownTypeTag(u8)
COF bytes used an unknown object type tag.
Crc32Mismatch
CRC32 in the COF trailer did not match the decoded payload.
Fields
Decompression(String)
Decompression failed while decoding object bytes.
Compression(String)
Compression failed while encoding object bytes.
Serialization(String)
Serialization to a stable wire representation failed.
Deserialization(String)
Deserialization from a stable wire representation failed.
InvalidObjectId(String)
Object ID text or bytes were malformed.
InvalidTreeEntryName(String)
Tree entry name failed canonical path validation.
PayloadTooLarge
Payload exceeded a configured object-size limit.
Fields
Io(Error)
Filesystem or stream I/O failed.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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 CoreError
impl !RefUnwindSafe for CoreError
impl Send for CoreError
impl Sync for CoreError
impl Unpin for CoreError
impl UnsafeUnpin for CoreError
impl !UnwindSafe for CoreError
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