Enum tftp::Message[][src]

pub enum Message<'b> {
    File {
        operation: FileOperation,
        path: &'b AsciiStr,
        mode: Mode,
    },
    Data(BlockIdBufAtMost512<'b>),
    Ack(BlockId),
    Error(BlockId, &'b AsciiStr),
}

A single TFTP message.

Variants

File

File operation message.

By protocol definition, this is the first message of TFTP session.

Fields of File

operation: FileOperation

Exact file operation client requested.

path: &'b AsciiStr

A path of file server should work with (write to it or read it).

mode: Mode

Data sending mode that client requested

Data(BlockIdBufAtMost512<'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

impl<'b> Debug for Message<'b>[src]

impl<'b> TryFrom<&'b [u8]> for Message<'b>[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.