Enum OptionCode
#[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§
§impl OptionCode
impl OptionCode
pub fn from_primitive(prim: u32) -> Option<OptionCode>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl Clone for OptionCode
impl Clone for OptionCode
§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 more§impl Debug for OptionCode
impl Debug for OptionCode
§impl<D> Decode<OptionCode, D> for OptionCodewhere
D: ResourceDialect,
impl<D> Decode<OptionCode, D> for OptionCodewhere
D: ResourceDialect,
§fn new_empty() -> OptionCode
fn new_empty() -> OptionCode
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<OptionCode, D> for OptionCodewhere
D: ResourceDialect,
impl<D> Encode<OptionCode, D> for OptionCodewhere
D: ResourceDialect,
§impl Hash for OptionCode
impl Hash for OptionCode
§impl Ord for OptionCode
impl Ord for OptionCode
§impl PartialEq for OptionCode
impl PartialEq for OptionCode
§impl PartialOrd for OptionCode
impl PartialOrd for OptionCode
§impl TypeMarker for OptionCode
impl TypeMarker for OptionCode
§type Owned = OptionCode
type Owned = OptionCode
The owned Rust type which this FIDL type decodes into.
§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.
§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
.§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 more§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.§impl ValueTypeMarker for OptionCode
impl ValueTypeMarker for OptionCode
§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 more§fn borrow(
value: &<OptionCode as TypeMarker>::Owned,
) -> <OptionCode as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<OptionCode as TypeMarker>::Owned, ) -> <OptionCode as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl 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