[−][src]Enum cidr::IpInet
Inet
type representing either an IPv4 or an IPv6 host within a
network
Variants
V4(Ipv4Inet)
IPv4 host within network
V6(Ipv6Inet)
IPv6 host within network
Implementations
impl IpInet
[src]
pub fn is_ipv4(&self) -> bool
[src]
Whether representing an IPv4 network
pub fn is_ipv6(&self) -> bool
[src]
Whether representing an IPv6 network
Trait Implementations
impl Clone for IpInet
[src]
impl Debug for IpInet
[src]
impl<'de> Deserialize<'de> for IpInet
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for IpInet
[src]
impl Eq for IpInet
[src]
impl From<Ipv4Inet> for IpInet
[src]
impl From<Ipv6Inet> for IpInet
[src]
impl FromStr for IpInet
[src]
type Err = NetworkParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<IpInet, NetworkParseError>
[src]
impl Hash for IpInet
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Inet for IpInet
[src]
type Address = IpAddr
Type for the underlying address (IpAddr
, Ipv4Addr
or Ipv6Addr
). Read more
type Cidr = IpCidr
Corresponding Cidr
type (representing only the network)
fn new(addr: Self::Address, len: u8) -> Result<Self, NetworkLengthTooLongError>
[src]
fn new_host(addr: Self::Address) -> Self
[src]
fn next(&mut self) -> bool
[src]
fn network(&self) -> Self::Cidr
[src]
fn address(&self) -> Self::Address
[src]
fn first_address(&self) -> Self::Address
[src]
fn first(&self) -> Self
[src]
fn last_address(&self) -> Self::Address
[src]
fn last(&self) -> Self
[src]
fn network_length(&self) -> u8
[src]
fn family(&self) -> Family
[src]
fn mask(&self) -> Self::Address
[src]
fn contains(&self, addr: &Self::Address) -> bool
[src]
fn is_host_address(&self) -> bool
[src]
impl Ord for IpInet
[src]
fn cmp(&self, other: &IpInet) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<IpInet> for IpInet
[src]
impl PartialOrd<IpInet> for IpInet
[src]
fn partial_cmp(&self, other: &IpInet) -> Option<Ordering>
[src]
fn lt(&self, other: &IpInet) -> bool
[src]
fn le(&self, other: &IpInet) -> bool
[src]
fn gt(&self, other: &IpInet) -> bool
[src]
fn ge(&self, other: &IpInet) -> bool
[src]
impl Serialize for IpInet
[src]
impl StructuralEq for IpInet
[src]
impl StructuralPartialEq for IpInet
[src]
Auto Trait Implementations
impl RefUnwindSafe for IpInet
impl Send for IpInet
impl Sync for IpInet
impl Unpin for IpInet
impl UnwindSafe for IpInet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,