pub enum TftpOption {
TransferSize(u64),
BlockSize(u16),
Timeout(u8),
WindowSize(u16),
}
Expand description
TFTP Options.
TFTP options are introduced in RFC 2347.
Variants§
TransferSize(u64)
Transfer size option, as defined in [RFC 2349].
Encodes the size of the transfer, in bytes. [RFC 2349]: https://datatracker.ietf.org/doc/html/rfc2349.
BlockSize(u16)
Block size option, as defined in RFC 2348.
The block size is the maximum number of file bytes that can be transferred in a single message.
Timeout(u8)
Timeout configuration option, as defined in RFC 2349.
Carries the negotiated timeout, in seconds.
WindowSize(u16)
Window size configuration option, as defined in RFC 7440.
The window size is the number of data blocks that can be transferred between acknowledgements.
Implementations§
Source§impl TftpOption
impl TftpOption
pub fn parse(option: &str, value: &str) -> Result<Forceable<Self>, ParseError>
pub const fn not_forced(self) -> Forceable<TftpOption>
pub const fn forced(self) -> Forceable<TftpOption>
Trait Implementations§
Source§impl Clone for TftpOption
impl Clone for TftpOption
Source§fn clone(&self) -> TftpOption
fn clone(&self) -> TftpOption
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TftpOption
impl Debug for TftpOption
Source§impl PartialEq for TftpOption
impl PartialEq for TftpOption
impl Eq for TftpOption
impl StructuralPartialEq for TftpOption
Auto Trait Implementations§
impl Freeze for TftpOption
impl RefUnwindSafe for TftpOption
impl Send for TftpOption
impl Sync for TftpOption
impl Unpin for TftpOption
impl UnwindSafe for TftpOption
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)