pub enum ShortFrameError {
InvalidLength {
actual: usize,
},
InvalidStart {
actual: u8,
},
InvalidStop {
actual: u8,
},
InvalidChecksum {
expected: u8,
actual: u8,
},
Control(ControlError),
OutputTooSmall {
actual: usize,
},
}Expand description
Error produced while constructing, encoding, or decoding a short frame.
Variants§
InvalidLength
The input length was not five bytes.
InvalidStart
The initial start byte was invalid.
InvalidStop
The final stop byte was invalid.
InvalidChecksum
The checksum did not match the frame contents.
Control(ControlError)
The control field is invalid for a short frame.
OutputTooSmall
The output buffer is shorter than five bytes.
Trait Implementations§
Source§impl Clone for ShortFrameError
impl Clone for ShortFrameError
Source§fn clone(&self) -> ShortFrameError
fn clone(&self) -> ShortFrameError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShortFrameError
Source§impl Debug for ShortFrameError
impl Debug for ShortFrameError
Source§impl Display for ShortFrameError
impl Display for ShortFrameError
impl Eq for ShortFrameError
Source§impl Error for ShortFrameError
impl Error for ShortFrameError
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()
Source§impl PartialEq for ShortFrameError
impl PartialEq for ShortFrameError
impl StructuralPartialEq for ShortFrameError
Auto Trait Implementations§
impl Freeze for ShortFrameError
impl RefUnwindSafe for ShortFrameError
impl Send for ShortFrameError
impl Sync for ShortFrameError
impl Unpin for ShortFrameError
impl UnsafeUnpin for ShortFrameError
impl UnwindSafe for ShortFrameError
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