[][src]Struct krill::commons::api::ResourceSet

pub struct ResourceSet { /* fields omitted */ }

This type defines a set of Internet Number Resources.

This type supports conversions to and from string representations, and is (de)serializable.

Implementations

impl ResourceSet[src]

pub fn new(asn: AsBlocks, v4: IpBlocks, v6: IpBlocks) -> Self[src]

pub fn from_strs(
    asn: &str,
    v4: &str,
    v6: &str
) -> Result<Self, ResourceSetError>
[src]

pub fn all_resources() -> Self[src]

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

pub fn summary(&self) -> ResourceSetSummary[src]

pub fn asn(&self) -> &AsBlocks[src]

pub fn v4(&self) -> IpBlocksForFamily[src]

pub fn v6(&self) -> IpBlocksForFamily[src]

pub fn to_as_resources(&self) -> AsResources[src]

pub fn to_ip_resources_v4(&self) -> IpResources[src]

pub fn to_ip_resources_v6(&self) -> IpResources[src]

pub fn apply_limit(
    &self,
    limit: &RequestResourceLimit
) -> Result<Self, ResourceSetError>
[src]

Apply a limit to this set, will return an error in case the limit exceeds the set.

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

Check of the other set is contained by this set. If this set contains inherited resources, then any explicit corresponding resources in the other set will be considered to fall outside of this set.

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

Returns the union of this ResourceSet and the other. I.e. a new ResourceSet containing all resources found in one or both.

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

Returns the intersection of this ResourceSet and the other. I.e. a new ResourceSet containing all resources found in both sets.

Trait Implementations

impl Clone for ResourceSet[src]

impl Debug for ResourceSet[src]

impl Default for ResourceSet[src]

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

impl Display for ResourceSet[src]

impl Eq for ResourceSet[src]

impl<'_> From<&'_ ResourceSet> for ResourceSetSummary[src]

impl From<TypedPrefix> for ResourceSet[src]

impl FromStr for ResourceSet[src]

type Err = ResourceSetError

The associated error which can be returned from parsing.

impl PartialEq<ResourceSet> for ResourceSet[src]

impl Serialize for ResourceSet[src]

impl<'_> TryFrom<&'_ Cert> for ResourceSet[src]

type Error = ResourceSetError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<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.