#[repr(u32)]pub enum OptionCode {
Show 66 variants
SubnetMask = 1,
TimeOffset = 2,
Router = 3,
TimeServer = 4,
NameServer = 5,
DomainNameServer = 6,
LogServer = 7,
CookieServer = 8,
LprServer = 9,
ImpressServer = 10,
ResourceLocationServer = 11,
HostName = 12,
BootFileSize = 13,
MeritDumpFile = 14,
DomainName = 15,
SwapServer = 16,
RootPath = 17,
ExtensionsPath = 18,
IpForwarding = 19,
NonLocalSourceRouting = 20,
PolicyFilter = 21,
MaxDatagramReassemblySize = 22,
DefaultIpTtl = 23,
PathMtuAgingTimeout = 24,
PathMtuPlateauTable = 25,
InterfaceMtu = 26,
AllSubnetsLocal = 27,
BroadcastAddress = 28,
PerformMaskDiscovery = 29,
MaskSupplier = 30,
PerformRouterDiscovery = 31,
RouterSolicitationAddress = 32,
StaticRoute = 33,
TrailerEncapsulation = 34,
ArpCacheTimeout = 35,
EthernetEncapsulation = 36,
TcpDefaultTtl = 37,
TcpKeepaliveInterval = 38,
TcpKeepaliveGarbage = 39,
NetworkInformationServiceDomain = 40,
NetworkInformationServers = 41,
NetworkTimeProtocolServers = 42,
VendorSpecificInformation = 43,
NetbiosOverTcpipNameServer = 44,
NetbiosOverTcpipDatagramDistributionServer = 45,
NetbiosOverTcpipNodeType = 46,
NetbiosOverTcpipScope = 47,
XWindowSystemFontServer = 48,
XWindowSystemDisplayManager = 49,
NetworkInformationServicePlusDomain = 64,
NetworkInformationServicePlusServers = 65,
MobileIpHomeAgent = 68,
SmtpServer = 69,
Pop3Server = 70,
NntpServer = 71,
DefaultWwwServer = 72,
DefaultFingerServer = 73,
DefaultIrcServer = 74,
StreettalkServer = 75,
StreettalkDirectoryAssistanceServer = 76,
OptionOverload = 52,
TftpServerName = 66,
BootfileName = 67,
MaxDhcpMessageSize = 57,
RenewalTimeValue = 58,
RebindingTimeValue = 59,
}
Expand description
The code of a DHCP option to be retrieved by Server.GetOption(). The code values are from https://tools.ietf.org/html/rfc2132 and the enum variants have been listed in the order they are presented in the RFC.
Variants§
SubnetMask = 1
TimeOffset = 2
Router = 3
TimeServer = 4
NameServer = 5
DomainNameServer = 6
LogServer = 7
CookieServer = 8
LprServer = 9
ImpressServer = 10
ResourceLocationServer = 11
HostName = 12
BootFileSize = 13
MeritDumpFile = 14
DomainName = 15
SwapServer = 16
RootPath = 17
ExtensionsPath = 18
IpForwarding = 19
NonLocalSourceRouting = 20
PolicyFilter = 21
MaxDatagramReassemblySize = 22
DefaultIpTtl = 23
PathMtuAgingTimeout = 24
PathMtuPlateauTable = 25
InterfaceMtu = 26
AllSubnetsLocal = 27
BroadcastAddress = 28
PerformMaskDiscovery = 29
MaskSupplier = 30
PerformRouterDiscovery = 31
RouterSolicitationAddress = 32
StaticRoute = 33
TrailerEncapsulation = 34
ArpCacheTimeout = 35
EthernetEncapsulation = 36
TcpDefaultTtl = 37
TcpKeepaliveInterval = 38
TcpKeepaliveGarbage = 39
NetworkInformationServiceDomain = 40
NetworkInformationServers = 41
NetworkTimeProtocolServers = 42
VendorSpecificInformation = 43
NetbiosOverTcpipNameServer = 44
NetbiosOverTcpipDatagramDistributionServer = 45
NetbiosOverTcpipNodeType = 46
NetbiosOverTcpipScope = 47
XWindowSystemFontServer = 48
XWindowSystemDisplayManager = 49
NetworkInformationServicePlusDomain = 64
NetworkInformationServicePlusServers = 65
MobileIpHomeAgent = 68
SmtpServer = 69
Pop3Server = 70
NntpServer = 71
DefaultWwwServer = 72
DefaultFingerServer = 73
DefaultIrcServer = 74
StreettalkServer = 75
StreettalkDirectoryAssistanceServer = 76
OptionOverload = 52
TftpServerName = 66
BootfileName = 67
MaxDhcpMessageSize = 57
RenewalTimeValue = 58
RebindingTimeValue = 59
Implementations§
Source§impl OptionCode
impl OptionCode
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
Source§impl Clone for OptionCode
impl Clone for OptionCode
Source§fn clone(&self) -> OptionCode
fn clone(&self) -> OptionCode
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 OptionCode
impl Debug for OptionCode
Source§impl<D: ResourceDialect> Decode<OptionCode, D> for OptionCode
impl<D: ResourceDialect> Decode<OptionCode, D> for OptionCode
Source§impl<D: ResourceDialect> Encode<OptionCode, D> for OptionCode
impl<D: ResourceDialect> Encode<OptionCode, D> for OptionCode
Source§impl Hash for OptionCode
impl Hash for OptionCode
Source§impl Ord for OptionCode
impl Ord for OptionCode
Source§fn cmp(&self, other: &OptionCode) -> Ordering
fn cmp(&self, other: &OptionCode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for OptionCode
impl PartialEq for OptionCode
Source§impl PartialOrd for OptionCode
impl PartialOrd for OptionCode
Source§impl TypeMarker for OptionCode
impl TypeMarker for OptionCode
Source§type Owned = OptionCode
type Owned = OptionCode
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for OptionCode
impl ValueTypeMarker for OptionCode
Source§type Borrowed<'a> = OptionCode
type Borrowed<'a> = OptionCode
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for OptionCode
impl Eq for OptionCode
impl StructuralPartialEq for OptionCode
Auto Trait Implementations§
impl Freeze for OptionCode
impl RefUnwindSafe for OptionCode
impl Send for OptionCode
impl Sync for OptionCode
impl Unpin for OptionCode
impl UnwindSafe for OptionCode
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
)