pub enum Ipv4 {}
Expand description
IPv4.
Ipv4
implements Ip
for IPv4.
Note that this type has no value constructor. It is used purely at the type
level. Attempting to construct it by calling Default::default
will panic.
Implementations§
Source§impl Ipv4
impl Ipv4
Sourcepub const LIMITED_BROADCAST_ADDRESS: SpecifiedAddr<Ipv4Addr> = _
pub const LIMITED_BROADCAST_ADDRESS: SpecifiedAddr<Ipv4Addr> = _
The limited broadcast address.
The limited broadcast address is considered to be a broadcast address on all networks regardless of subnet address. This is distinct from the subnet-specific broadcast address (e.g., 192.168.255.255 on the subnet 192.168.0.0/16). It is defined in the IANA IPv4 Special-Purpose Address Registry.
Sourcepub const CLASS_A_SUBNET: Subnet<Ipv4Addr> = _
pub const CLASS_A_SUBNET: Subnet<Ipv4Addr> = _
The Class A subnet.
The Class A subnet is defined in RFC 1812 section 2.2.5.1.
Sourcepub const CLASS_B_SUBNET: Subnet<Ipv4Addr> = _
pub const CLASS_B_SUBNET: Subnet<Ipv4Addr> = _
The Class B subnet.
The Class B subnet is defined in RFC 1812 section 2.2.5.1.
Sourcepub const CLASS_C_SUBNET: Subnet<Ipv4Addr> = _
pub const CLASS_C_SUBNET: Subnet<Ipv4Addr> = _
The Class C subnet.
The Class C subnet is defined in RFC 1812 section 2.2.5.1.
Sourcepub const CLASS_D_SUBNET: Subnet<Ipv4Addr> = _
pub const CLASS_D_SUBNET: Subnet<Ipv4Addr> = _
The Class D subnet.
This subnet is also known as the multicast subnet.
The Class D subnet is defined in RFC 1812 section 2.2.5.1.
Sourcepub const CLASS_E_SUBNET: Subnet<Ipv4Addr> = _
pub const CLASS_E_SUBNET: Subnet<Ipv4Addr> = _
The Class E subnet.
The Class E subnet is meant for experimental purposes, and should not be used on the general internet. RFC 1812 Section 5.3.7 suggests that routers SHOULD discard packets with a source address in the Class E subnet. The Class E subnet is defined in RFC 1112 Section 4.
Sourcepub const LINK_LOCAL_MULTICAST_SUBNET: Subnet<Ipv4Addr> = _
pub const LINK_LOCAL_MULTICAST_SUBNET: Subnet<Ipv4Addr> = _
The subnet of link-local multicast addresses, outlined in RFC 5771 Section 4.
Sourcepub const ALL_SYSTEMS_MULTICAST_ADDRESS: MulticastAddr<Ipv4Addr> = _
pub const ALL_SYSTEMS_MULTICAST_ADDRESS: MulticastAddr<Ipv4Addr> = _
The multicast address subscribed to by all systems on the local network, defined in the IPv4 Multicast Address Space Registry.
Sourcepub const ALL_ROUTERS_MULTICAST_ADDRESS: MulticastAddr<Ipv4Addr> = _
pub const ALL_ROUTERS_MULTICAST_ADDRESS: MulticastAddr<Ipv4Addr> = _
The multicast address subscribed to by all routers on the local network, defined in the IPv4 Multicast Address Space Registry.
Trait Implementations§
Source§impl Ip for Ipv4
impl Ip for Ipv4
Source§const LOOPBACK_ADDRESS: SpecifiedAddr<Ipv4Addr> = _
const LOOPBACK_ADDRESS: SpecifiedAddr<Ipv4Addr> = _
The default IPv4 address used for loopback, defined in RFC 5735 Section 3.
Note that while this address is the most commonly used address for
loopback traffic, any address in the LOOPBACK_SUBNET
may be used.
Source§const LOOPBACK_SUBNET: Subnet<Ipv4Addr> = _
const LOOPBACK_SUBNET: Subnet<Ipv4Addr> = _
The IPv4 loopback subnet, defined in RFC 1122 Section 3.2.1.3.
Source§const MULTICAST_SUBNET: Subnet<Ipv4Addr> = Self::CLASS_D_SUBNET
const MULTICAST_SUBNET: Subnet<Ipv4Addr> = Self::CLASS_D_SUBNET
The IPv4 Multicast subnet, defined in RFC 1112 Section 4.
Source§const LINK_LOCAL_UNICAST_SUBNET: Subnet<Ipv4Addr> = _
const LINK_LOCAL_UNICAST_SUBNET: Subnet<Ipv4Addr> = _
The subnet of link-local unicast IPv4 addresses, outlined in RFC 3927 Section 2.1.
Source§const MINIMUM_LINK_MTU: Mtu = _
const MINIMUM_LINK_MTU: Mtu = _
The IPv4 minimum link MTU.
Per RFC 791 Section 3.2, “[\e]very internet module must be able to forward a datagram of 68 octets without further fragmentation.”
Source§const VERSION_MARKER: IpVersionMarker<Self> = _
const VERSION_MARKER: IpVersionMarker<Self> = _
Source§const UNSPECIFIED_ADDRESS: Ipv4Addr = _
const UNSPECIFIED_ADDRESS: Ipv4Addr = _
Source§fn map_ip<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>(
input: In,
v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> <Out as GenericOverIp<Ipv4>>::Type,
_v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> <Out as GenericOverIp<Ipv6>>::Type,
) -> Out
fn map_ip<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>( input: In, v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> <Out as GenericOverIp<Ipv4>>::Type, _v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> <Out as GenericOverIp<Ipv6>>::Type, ) -> Out
Source§fn map_ip_in<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out>(
input: In,
v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> Out,
v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> Out,
) -> Out
fn map_ip_in<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out>( input: In, v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> Out, v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> Out, ) -> Out
Source§fn map_ip_out<In, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>(
input: In,
v4: impl FnOnce(In) -> <Out as GenericOverIp<Ipv4>>::Type,
v6: impl FnOnce(In) -> <Out as GenericOverIp<Ipv6>>::Type,
) -> Out
fn map_ip_out<In, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>( input: In, v4: impl FnOnce(In) -> <Out as GenericOverIp<Ipv4>>::Type, v6: impl FnOnce(In) -> <Out as GenericOverIp<Ipv6>>::Type, ) -> Out
Source§impl Ord for Ipv4
impl Ord for Ipv4
Source§impl PartialOrd for Ipv4
impl PartialOrd for Ipv4
impl Copy for Ipv4
impl Eq for Ipv4
impl StructuralPartialEq for Ipv4
Auto Trait Implementations§
impl Freeze for Ipv4
impl RefUnwindSafe for Ipv4
impl Send for Ipv4
impl Sync for Ipv4
impl Unpin for Ipv4
impl UnwindSafe for Ipv4
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
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)
clone_to_uninit
)