pub enum TftpPacket<B: SplitByteSlice> {
ReadRequest(RequestBody<B>),
WriteRequest(RequestBody<B>),
Data(DataBody<B>),
Ack(AckBody<B>),
Error(ErrorBody<B>),
OptionAck(OptionAckBody),
}
Expand description
A TFTP packet.
Implements [ParsablePacket
] to parse from wire representation.
Variants§
ReadRequest(RequestBody<B>)
WriteRequest(RequestBody<B>)
Data(DataBody<B>)
Ack(AckBody<B>)
Error(ErrorBody<B>)
OptionAck(OptionAckBody)
Implementations§
Source§impl<B: SplitByteSlice> TftpPacket<B>
impl<B: SplitByteSlice> TftpPacket<B>
pub fn into_read_request(self) -> Result<RequestBody<B>, Self>
pub fn into_write_request(self) -> Result<RequestBody<B>, Self>
pub fn into_data(self) -> Result<DataBody<B>, Self>
pub fn into_ack(self) -> Result<AckBody<B>, Self>
pub fn into_error(self) -> Result<ErrorBody<B>, Self>
pub fn into_oack(self) -> Result<OptionAckBody, Self>
Trait Implementations§
Source§impl<B: Debug + SplitByteSlice> Debug for TftpPacket<B>
impl<B: Debug + SplitByteSlice> Debug for TftpPacket<B>
Source§impl<B> ParsablePacket<B, ()> for TftpPacket<B>where
B: SplitByteSlice,
impl<B> ParsablePacket<B, ()> for TftpPacket<B>where
B: SplitByteSlice,
Auto Trait Implementations§
impl<B> Freeze for TftpPacket<B>where
B: Freeze,
impl<B> RefUnwindSafe for TftpPacket<B>where
B: RefUnwindSafe,
impl<B> Send for TftpPacket<B>where
B: Send,
impl<B> Sync for TftpPacket<B>where
B: Sync,
impl<B> Unpin for TftpPacket<B>where
B: Unpin,
impl<B> UnwindSafe for TftpPacket<B>where
B: UnwindSafe,
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