[][src]Enum rpki::resources::IpBlock

pub enum IpBlock {
    Prefix(Prefix),
    Range(AddressRange),
}

A consecutive sequence of IP addresses.

Variants

Prefix(Prefix)

The block is expressed as a prefix.

Range(AddressRange)

The block is expressed as a range.

Methods

impl IpBlock[src]

pub fn from_v4_str(s: &str) -> Result<Self, FromStrError>[src]

Creates a new block from an IPv4 representation.

pub fn from_v6_str(s: &str) -> Result<Self, FromStrError>[src]

Creates a new block from an IPv6 representation.

pub fn min(&self) -> Addr[src]

The smallest address of the block.

pub fn max(&self) -> Addr[src]

The largest address of the block.

pub fn fmt_v4(self, f: &mut Formatter) -> Result[src]

Formats the block as a IPv4 block.

pub fn fmt_v6(self, f: &mut Formatter) -> Result[src]

Formats the block as a IPv4 block.

impl IpBlock[src]

pub fn encode(self) -> impl Values[src]

Returns an encoder for the range.

This encoder will produce a IPAddressOrRange value.

Trait Implementations

impl From<Prefix> for IpBlock[src]

impl From<(Addr, Addr)> for IpBlock[src]

impl Clone for IpBlock[src]

impl Copy for IpBlock[src]

impl Eq for IpBlock[src]

impl PartialEq<IpBlock> for IpBlock[src]

impl Debug for IpBlock[src]

impl FromStr for IpBlock[src]

type Err = FromStrError

The associated error which can be returned from parsing.

impl FromIterator<IpBlock> for IpBlocks[src]

Auto Trait Implementations

impl Send for IpBlock

impl Sync for IpBlock

impl Unpin for IpBlock

impl UnwindSafe for IpBlock

impl RefUnwindSafe for IpBlock

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]