pub struct BufAtMost512<'b>(/* private fields */);
Expand description
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§
Source§impl<'b> BufAtMost512<'b>
impl<'b> BufAtMost512<'b>
Sourcepub fn is_incomplete(&self) -> bool
pub fn is_incomplete(&self) -> bool
Check if buffer is less than 512 bytes in size.
Trait Implementations§
Source§impl<'b> AsRef<[u8]> for BufAtMost512<'b>
impl<'b> AsRef<[u8]> for BufAtMost512<'b>
Source§impl<'b> Debug for BufAtMost512<'b>
impl<'b> Debug for BufAtMost512<'b>
Auto Trait Implementations§
impl<'b> Freeze for BufAtMost512<'b>
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§
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