[][src]Struct rpki::resources::IpResources

pub struct IpResources(_);

The IP Address Resources of an RPKI Certificate.

This type contains the resources for one of the address families that can be contained in the certificate.

Methods

impl IpResources[src]

pub fn inherit() -> Self[src]

Creates a new IpResources with a ResourcesChoice::Inherit

pub fn blocks(blocks: IpBlocks) -> Self[src]

Creates a new IpResources for the given blocks.

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

Returns whether the resources are of the inherited variant.

pub fn as_blocks(&self) -> Option<&IpBlocks>[src]

Returns a reference to the blocks if there are any.

pub fn to_blocks(&self) -> Result<IpBlocks, ValidationError>[src]

Converts the resources into blocks or returns an error.

impl IpResources[src]

pub fn take_families_from<S: Source>(
    cons: &mut Constructed<S>
) -> Result<(Option<Self>, Option<Self>), S::Err>
[src]

Takes all IP resources from the beginning of a constructed value.

On success, the function returns a pair of optional IP resources, the first for IPv4, the second for IPv6.

pub fn take_from<S: Source>(cons: &mut Constructed<S>) -> Result<Self, S::Err>[src]

Takes a single set of IP resources from a constructed value.

pub fn encode_families(
    v4: Option<Self>,
    v6: Option<Self>
) -> Option<impl Values>
[src]

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

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

Trait Implementations

impl Clone for IpResources[src]

impl Eq for IpResources[src]

impl PartialEq<IpResources> for IpResources[src]

impl Debug for IpResources[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, 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]