pub enum Message<'b> {
File {
operation: FileOperation,
path: &'b AsciiStr,
mode: Mode,
},
Data(BlockId, BufAtMost512<'b>),
Ack(BlockId),
Error(BlockId, &'b AsciiStr),
}
Expand description
A single TFTP message.
Variants§
File
File operation message.
By protocol definition, this is the first message of TFTP session.
Fields
§
operation: FileOperation
Exact file operation client requested.
Data(BlockId, BufAtMost512<'b>)
A block of data (max 512 bytes in len).
Ack(BlockId)
Acknowledge of receiving a block of data.
Error(BlockId, &'b AsciiStr)
Error happened during TFTP session.
Trait Implementations§
Auto Trait Implementations§
impl<'b> Freeze for Message<'b>
impl<'b> RefUnwindSafe for Message<'b>
impl<'b> Send for Message<'b>
impl<'b> Sync for Message<'b>
impl<'b> Unpin for Message<'b>
impl<'b> UnwindSafe for Message<'b>
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