[−][src]Struct krill::commons::api::ResourceSet
This type defines a set of Internet Number Resources.
This type supports conversions to and from string representations, and is (de)serializable.
Methods
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, ResSetErr>
[src]
pub fn all_resources() -> Self
[src]
pub fn is_empty(&self) -> bool
[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, ResSetErr>
[src]
&self,
limit: &RequestResourceLimit
) -> Result<Self, ResSetErr>
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 From<TypedPrefix> for ResourceSet
[src]
fn from(tp: TypedPrefix) -> ResourceSet
[src]
impl Clone for ResourceSet
[src]
fn clone(&self) -> ResourceSet
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for ResourceSet
[src]
impl Eq for ResourceSet
[src]
impl PartialEq<ResourceSet> for ResourceSet
[src]
impl Debug for ResourceSet
[src]
impl Display for ResourceSet
[src]
impl<'_> TryFrom<&'_ Cert> for ResourceSet
[src]
type Error = ResSetErr
The type returned in the event of a conversion error.
fn try_from(cert: &Cert) -> Result<Self, Self::Error>
[src]
impl Serialize for ResourceSet
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for ResourceSet
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for ResourceSet
impl Sync for ResourceSet
impl Unpin for ResourceSet
impl UnwindSafe for ResourceSet
impl RefUnwindSafe for ResourceSet
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,