Struct smoltcp::wire::Ipv4Address
[−]
[src]
pub struct Ipv4Address(pub [u8; 4]);
A four-octet IPv4 address.
Methods
impl Address
[src]
fn new(a0: u8, a1: u8, a2: u8, a3: u8) -> Address
[src]
Construct an IPv4 address from parts.
fn from_bytes(data: &[u8]) -> Address
[src]
Construct an IPv4 address from a sequence of octets, in big-endian.
Panics
The function panics if data
is not four octets long.
fn as_bytes(&self) -> &[u8]
[src]
Return an IPv4 address as a sequence of octets, in big-endian.
fn is_unicast(&self) -> bool
[src]
Query whether the address is an unicast address.
fn is_broadcast(&self) -> bool
[src]
Query whether the address is the broadcast address.
fn is_multicast(&self) -> bool
[src]
Query whether the address is a multicast address.
fn is_unspecified(&self) -> bool
[src]
Query whether the address falls into the "unspecified" range.
fn is_link_local(&self) -> bool
[src]
Query whether the address falls into the "link-local" range.
fn is_loopback(&self) -> bool
[src]
Query whether the address falls into the "loopback" range.
Trait Implementations
impl FromStr for Ipv4Address
[src]
type Err = ()
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Ipv4Address, ()>
[src]
Parse a string representation of an IPv4 address.
impl Debug for Address
[src]
impl PartialEq for Address
[src]
fn eq(&self, __arg_0: &Address) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Address) -> bool
[src]
This method tests for !=
.
impl Eq for Address
[src]
impl PartialOrd for Address
[src]
fn partial_cmp(&self, __arg_0: &Address) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Address) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Address) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Address) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Address) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Address
[src]
fn cmp(&self, __arg_0: &Address) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Clone for Address
[src]
fn clone(&self) -> Address
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more