pub enum StreamError {
BadMagic,
UnsupportedVersion(u32),
CrcMismatch {
cmd: u16,
expected: u32,
computed: u32,
},
TruncatedHeader(Error),
TruncatedPayload(Error),
TruncatedTlv {
detail: String,
},
InvalidTlvType(u16),
MissingAttribute(&'static str),
InvalidAttribute {
name: &'static str,
detail: String,
},
UnknownCommand(u16),
Io(Error),
}Expand description
Errors that can occur while parsing a btrfs send stream.
Variants§
BadMagic
The stream header does not start with the btrfs send magic.
UnsupportedVersion(u32)
The stream version is not supported (must be 1-3).
CrcMismatch
CRC32C checksum mismatch on a command.
TruncatedHeader(Error)
The stream header could not be read completely.
TruncatedPayload(Error)
A command payload could not be read completely.
TruncatedTlv
A TLV attribute structure is incomplete.
InvalidTlvType(u16)
A TLV attribute type is out of range.
MissingAttribute(&'static str)
A required TLV attribute is missing from a command.
InvalidAttribute
A TLV attribute value is malformed (wrong size, bad encoding, etc.).
UnknownCommand(u16)
An unknown command type was encountered.
Io(Error)
An underlying I/O error.
Trait Implementations§
Source§impl Debug for StreamError
impl Debug for StreamError
Source§impl Display for StreamError
impl Display for StreamError
Source§impl Error for StreamError
impl Error for StreamError
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 StreamError
impl !RefUnwindSafe for StreamError
impl Send for StreamError
impl Sync for StreamError
impl Unpin for StreamError
impl UnsafeUnpin for StreamError
impl !UnwindSafe for StreamError
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