pub enum SbfError {
InvalidSync,
CrcMismatch {
expected: u16,
actual: u16,
},
IncompleteBlock {
needed: usize,
have: usize,
},
InvalidLength(u16),
UnknownBlockId(u16),
ParseError(String),
Io(Error),
EndOfStream,
}Expand description
Errors that can occur during SBF parsing
Variants§
InvalidSync
Invalid sync bytes (expected 0x24 0x40)
CrcMismatch
CRC checksum mismatch
IncompleteBlock
Block is incomplete (not enough data)
InvalidLength(u16)
Invalid block length (must be >= 8 and divisible by 4)
UnknownBlockId(u16)
Unknown block ID
ParseError(String)
Block-specific parsing error
Io(Error)
I/O error during reading
EndOfStream
End of stream reached
Trait Implementations§
Source§impl Error for SbfError
impl Error for SbfError
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 SbfError
impl !RefUnwindSafe for SbfError
impl Send for SbfError
impl Sync for SbfError
impl Unpin for SbfError
impl UnsafeUnpin for SbfError
impl !UnwindSafe for SbfError
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