pub enum TranslationError {
DataTooLarge,
NotEnoughData(u8, u8),
MissingEscapedData(u8),
FrameEndInData,
}
Expand description
Each type of error that can occur from translating to and from SHDLC
Variants§
DataTooLarge
Too much data was supplied. Data frame was larger than 255 bytes long
NotEnoughData(u8, u8)
The data found was less than the length of the data exepected. The first number in the tuple corresponds to expected data length and the second value is the actual data length.
MissingEscapedData(u8)
The escape byte 0x7D was encountered but a valid swap character was not found
FrameEndInData
The frame end byte was fround inside the data
Trait Implementations§
Source§impl Clone for TranslationError
impl Clone for TranslationError
Source§fn clone(&self) -> TranslationError
fn clone(&self) -> TranslationError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TranslationError
impl Debug for TranslationError
Source§impl Display for TranslationError
impl Display for TranslationError
Source§impl<T> From<CapacityError<T>> for TranslationError
impl<T> From<CapacityError<T>> for TranslationError
Source§fn from(_: CapacityError<T>) -> Self
fn from(_: CapacityError<T>) -> Self
Converts to this type from the input type.
Source§impl From<TranslationError> for DeviceError
impl From<TranslationError> for DeviceError
Source§fn from(value: TranslationError) -> Self
fn from(value: TranslationError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TranslationError
impl PartialEq for TranslationError
impl Copy for TranslationError
impl Eq for TranslationError
impl StructuralPartialEq for TranslationError
Auto Trait Implementations§
impl Freeze for TranslationError
impl RefUnwindSafe for TranslationError
impl Send for TranslationError
impl Sync for TranslationError
impl Unpin for TranslationError
impl UnwindSafe for TranslationError
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