pub enum OptionType {
BlockSize,
TransferSize,
Timeout,
TimeoutMs,
WindowSize,
WindowWait,
}Expand description
OptionType enum represents the TFTP option types
This enum has function implementations for conversion between
OptionTypes and strs.
§Example
use tftpd::OptionType;
assert_eq!(OptionType::BlockSize, "blksize".parse().unwrap());
assert_eq!("tsize", OptionType::TransferSize.as_str());Variants§
BlockSize
Block Size option type
TransferSize
Transfer Size option type
Timeout
Timeout option type
TimeoutMs
Timeout in ms option type
WindowSize
Windowsize option type
WindowWait
Windowwait option type
Implementations§
Source§impl OptionType
impl OptionType
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Converts an OptionType to a str.
Trait Implementations§
Source§impl Clone for OptionType
impl Clone for OptionType
Source§fn clone(&self) -> OptionType
fn clone(&self) -> OptionType
Returns a duplicate 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 OptionType
impl Debug for OptionType
Source§impl FromStr for OptionType
impl FromStr for OptionType
Source§impl PartialEq for OptionType
impl PartialEq for OptionType
impl Copy for OptionType
impl StructuralPartialEq for OptionType
Auto Trait Implementations§
impl Freeze for OptionType
impl RefUnwindSafe for OptionType
impl Send for OptionType
impl Sync for OptionType
impl Unpin for OptionType
impl UnwindSafe for OptionType
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