Struct tftp::BufAtMost512[][src]

pub struct BufAtMost512<'b>(_);

Buffer, that is at most 512 bytes in size.

In TFTP terms, a data buffer that is exactly 512 bytes in len means, that client should await for at least one more data block until finally receiving “incomplete” buffer with less than 512 bytes len. You can use is_incomplete to conveniently check for such a situation.

Implementations

impl<'b> BufAtMost512<'b>[src]

pub fn is_incomplete(&self) -> bool[src]

Check if buffer is less than 512 bytes in size.

Trait Implementations

impl<'b> AsRef<[u8]> for BufAtMost512<'b>[src]

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

impl<'b> From<&'b [u8; 512]> for BufAtMost512<'b>[src]

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

type Error = BufLenIsGreaterThan512

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'b> RefUnwindSafe for BufAtMost512<'b>

impl<'b> Send for BufAtMost512<'b>

impl<'b> Sync for BufAtMost512<'b>

impl<'b> Unpin for BufAtMost512<'b>

impl<'b> UnwindSafe for BufAtMost512<'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.