[][src]Struct rpki::resources::AsBlocks

pub struct AsBlocks(_);

A possibly empty sequence of consecutive sets of AS numbers.

Methods

impl AsBlocks[src]

pub fn empty() -> Self[src]

Creates empty AS blocks.

pub fn from_resources(
    res: Option<&AsResources>
) -> Result<Self, ValidationError>
[src]

Creates AS blocks from AS resources.

If the AS resources are of the inherited variant, a validation error is returned.

pub fn is_empty(&self) -> bool[src]

Returns whether the blocks is empty.

pub fn iter(&self) -> impl Iterator<Item = &AsBlock>[src]

Returns an iterator over the individual AS number blocks.

pub fn validate_issued(
    &self,
    res: Option<&AsResources>,
    mode: Overclaim
) -> Result<AsBlocks, ValidationError>
[src]

Validates AS resources issued under these blocks.

impl AsBlocks[src]

pub fn contains(&self, other: &Self) -> bool[src]

Returns whether this AsBlocks contains the other in its entirety.

pub fn intersection(&self, other: &Self) -> Self[src]

Return the intersection of this AsBlocks and the other. I.e. all resources which are found in both.

pub fn union(&self, other: &Self) -> Self[src]

Returns a new AsBlocks with the union of this and the other AsBlocks.

i.e. all resources found in one or both AsBlocks.

impl AsBlocks[src]

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

pub fn encode_ref<'a>(&'a self) -> impl Values + 'a[src]

Trait Implementations

impl Clone for AsBlocks[src]

impl Eq for AsBlocks[src]

impl PartialEq<AsBlocks> for AsBlocks[src]

impl Display for AsBlocks[src]

impl Debug for AsBlocks[src]

impl FromStr for AsBlocks[src]

type Err = FromStrError

The associated error which can be returned from parsing.

impl FromIterator<AsBlock> for AsBlocks[src]

impl Serialize for AsBlocks[src]

impl<'de> Deserialize<'de> for AsBlocks[src]

Auto Trait Implementations

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]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]