[][src]Enum rpki::resources::AsBlock

pub enum AsBlock {
    Id(AsId),
    Range(AsRange),
}

A block of consecutive AS numbers.

Variants

Id(AsId)

The block is a single AS number.

Range(AsRange)

The block is a range of AS numbers.

Methods

impl AsBlock[src]

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

The smallest AS number that is part of this block.

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

The largest AS number that is still part of this block.

pub fn set_min(&mut self, id: AsId)[src]

Sets a new minimum AS number.

Panics

If you try to set the minimum to value larger than the current maximum, the method will panic.

pub fn set_max(&mut self, id: AsId)[src]

Sets a new maximum AS number.

Panics

If you try to set the minimum to value smaller than the current minimum, the method will panic.

Trait Implementations

impl From<AsId> for AsBlock[src]

impl From<(AsId, AsId)> for AsBlock[src]

impl Clone for AsBlock[src]

impl Copy for AsBlock[src]

impl Eq for AsBlock[src]

impl PartialEq<AsBlock> for AsBlock[src]

impl Display for AsBlock[src]

impl Debug for AsBlock[src]

impl FromStr for AsBlock[src]

type Err = FromStrError

The associated error which can be returned from parsing.

impl FromIterator<AsBlock> for AsBlocks[src]

Auto Trait Implementations

impl Send for AsBlock

impl Sync for AsBlock

impl Unpin for AsBlock

impl UnwindSafe for AsBlock

impl RefUnwindSafe for AsBlock

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> ToString for T where
    T: Display + ?Sized
[src]

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]