#[repr(C)]pub struct Sequence(/* private fields */);
Expand description
Represents the sequence (seq
) number in the XMODEM protocol.
From the XMODEM specification:
one byte sequence number which starts at 1, and
increments by one until it reaches 255 and then
wraps around to zero.
Implementations§
Source§impl Sequence
impl Sequence
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
Gets the 1's
complement of the Sequence.
From the XMODEM specification:
one byte 1's complement of seq. This can be
calculated as cmpl = 255 - (255 and seq) or using
xor as cmpl = (255 and seq) xor 255.
Trait Implementations§
impl Copy for Sequence
impl Eq for Sequence
impl StructuralPartialEq for Sequence
Auto Trait Implementations§
impl Freeze for Sequence
impl RefUnwindSafe for Sequence
impl Send for Sequence
impl Sync for Sequence
impl Unpin for Sequence
impl UnwindSafe for Sequence
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