Struct iprange::CompactIpv4
[−]
[src]
pub struct CompactIpv4(_);
A wrapper of u32
to represent an IPv4 address.
Methods
impl CompactIpv4
[src]
fn successor(self) -> Option<CompactIpv4>
[src]
This method returns the successor of self
.
If self
does not have a successor, that is to say
self
is 255.255.255.255
, then None
is returned.
fn predecessor(self) -> Option<CompactIpv4>
[src]
This method returns the predecessor of self
.
If self
does not have a predecessor, that is to say
self
is 0.0.0.0
, then None
is returned.
Trait Implementations
impl PartialEq for CompactIpv4
[src]
fn eq(&self, __arg_0: &CompactIpv4) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CompactIpv4) -> bool
[src]
This method tests for !=
.
impl Eq for CompactIpv4
[src]
impl PartialOrd for CompactIpv4
[src]
fn partial_cmp(&self, __arg_0: &CompactIpv4) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &CompactIpv4) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &CompactIpv4) -> 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: &CompactIpv4) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &CompactIpv4) -> 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 CompactIpv4
[src]
fn cmp(&self, __arg_0: &CompactIpv4) -> 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 CompactIpv4
[src]
fn clone(&self) -> CompactIpv4
[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
impl Copy for CompactIpv4
[src]
impl BitAnd for CompactIpv4
[src]
type Output = CompactIpv4
The resulting type after applying the &
operator.
fn bitand(self, other: CompactIpv4) -> CompactIpv4
[src]
Performs the &
operation.
impl BitOr for CompactIpv4
[src]
type Output = CompactIpv4
The resulting type after applying the |
operator.
fn bitor(self, other: CompactIpv4) -> CompactIpv4
[src]
Performs the |
operation.
impl BitXor for CompactIpv4
[src]
type Output = CompactIpv4
The resulting type after applying the ^
operator.
fn bitxor(self, other: CompactIpv4) -> CompactIpv4
[src]
Performs the ^
operation.
impl Not for CompactIpv4
[src]
type Output = CompactIpv4
The resulting type after applying the !
operator.
fn not(self) -> CompactIpv4
[src]
Performs the unary !
operation.
impl BitAndAssign for CompactIpv4
[src]
fn bitand_assign(&mut self, other: CompactIpv4)
[src]
Performs the &=
operation.
impl BitOrAssign for CompactIpv4
[src]
fn bitor_assign(&mut self, other: CompactIpv4)
[src]
Performs the |=
operation.
impl BitXorAssign for CompactIpv4
[src]
fn bitxor_assign(&mut self, other: CompactIpv4)
[src]
Performs the ^=
operation.
impl From<Ipv4Addr> for CompactIpv4
[src]
fn from(addr: Ipv4Addr) -> CompactIpv4
[src]
Performs the conversion.
impl From<u32> for CompactIpv4
[src]
fn from(addr: u32) -> CompactIpv4
[src]
Performs the conversion.
impl Into<u32> for CompactIpv4
[src]
fn into(self: CompactIpv4) -> u32
[src]
Performs the conversion.