[−][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.
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]
asn: &str,
v4: &str,
v6: &str
) -> Result<Self, ResourceSetError>
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]
&self,
limit: &RequestResourceLimit
) -> Result<Self, ResourceSetError>
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]
fn clone(&self) -> ResourceSet
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ResourceSet
[src]
impl Default for ResourceSet
[src]
impl<'de> Deserialize<'de> for ResourceSet
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for ResourceSet
[src]
impl Eq for ResourceSet
[src]
impl<'_> From<&'_ ResourceSet> for ResourceSetSummary
[src]
fn from(rs: &ResourceSet) -> Self
[src]
impl From<TypedPrefix> for ResourceSet
[src]
fn from(tp: TypedPrefix) -> ResourceSet
[src]
impl FromStr for ResourceSet
[src]
type Err = ResourceSetError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<ResourceSet> for ResourceSet
[src]
impl Serialize for ResourceSet
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'_> TryFrom<&'_ Cert> for ResourceSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for ResourceSet
impl Send for ResourceSet
impl Sync for ResourceSet
impl Unpin for ResourceSet
impl UnwindSafe for ResourceSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> 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<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 = Infallible
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>,