pub struct XModem {
pub max_errors: u32,
pub pad_byte: u8,
pub block_length: BlockLengthKind,
/* private fields */
}Expand description
Xmodem acts as state for XMODEM transfers
Fields§
§max_errors: u32The number of errors that can occur before the communication is considered a failure. Errors include unexpected bytes and timeouts waiting for bytes.
pad_byte: u8The byte used to pad the last block. XMODEM can only send blocks of a certain size, so if the message is not a multiple of that size the last block needs to be padded.
block_length: BlockLengthKindThe length of each block. There are only two options: 128-byte blocks (standard XMODEM) or 1024-byte blocks (XMODEM-1k).
Trait Implementations§
impl Copy for XModem
Auto Trait Implementations§
impl Freeze for XModem
impl RefUnwindSafe for XModem
impl Send for XModem
impl Sync for XModem
impl Unpin for XModem
impl UnwindSafe for XModem
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