Struct awsipranges::AwsIpRanges

source ·
pub struct AwsIpRanges { /* private fields */ }
Expand description

Collection of AWS IP ranges that provides methods to search and filter the prefixes and extract information about the regions, network border groups, and services represented in the collection.

Implementations§

source§

impl AwsIpRanges

source

pub fn sync_token(&self) -> &String

Publication time of the current set of AWS IP Ranges in Unix epoch time format.

source

pub fn create_date(&self) -> &DateTime<Utc>

Publication time of the current set of AWS IP Ranges in UTC DateTime format.

source

pub fn regions(&self) -> &BTreeSet<Rc<str>>

AWS regions represented in the current set of AWS IP Ranges.

source

pub fn network_border_groups(&self) -> &BTreeSet<Rc<str>>

Network border groups represented in the current set of AWS IP Ranges.

source

pub fn services(&self) -> &BTreeSet<Rc<str>>

AWS services represented in the current set of AWS IP Ranges.

source

pub fn prefixes(&self) -> &BTreeMap<IpNetwork, AwsIpPrefix>

Map of IpNetwork CIDRs to AwsIpPrefix records.

source

pub fn get_prefix(&self, value: &IpNetwork) -> Option<&AwsIpPrefix>

Get the AwsIpPrefix record for the provided IpNetwork CIDR.

source

pub fn get_longest_match_prefix( &self, value: &IpNetwork, ) -> Option<&AwsIpPrefix>

Get the longest matching AwsIpPrefix record for the provided IpNetwork CIDR.

source

pub fn get_supernet_prefixes( &self, value: &IpNetwork, ) -> Option<BTreeSet<AwsIpPrefix>>

Get all AwsIpPrefix records that are supernets of the provided IpNetwork CIDR.

source

pub fn get_region(&self, value: &str) -> Option<Rc<str>>

Get a reference-counted string (Rc<str>) region for the provided region name.

source

pub fn get_network_border_group(&self, value: &str) -> Option<Rc<str>>

Get a reference-counted string (Rc<str>) network border group for the provided network border group name.

source

pub fn get_service(&self, value: &str) -> Option<Rc<str>>

Get a reference-counted string (Rc<str>) service for the provided service name.

source

pub fn search<'p, P>(&self, values: P) -> Box<SearchResults>
where P: Iterator<Item = &'p IpNetwork>,

Search for the AWS IP Prefixes that contain the provided IpNetwork CIDRs.

source

pub fn filter(&self, filter: &Filter) -> Box<AwsIpRanges>

Filter the AWS IP Prefixes using the provided Filter.

Trait Implementations§

source§

impl Clone for AwsIpRanges

source§

fn clone(&self) -> AwsIpRanges

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AwsIpRanges

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AwsIpRanges

source§

fn default() -> AwsIpRanges

Returns the “default value” for a type. Read more
source§

impl From<BTreeMap<IpNetwork, AwsIpPrefix>> for AwsIpRanges

source§

fn from(value: BTreeMap<IpNetwork, AwsIpPrefix>) -> Self

Converts to this type from the input type.
source§

impl From<BTreeSet<AwsIpPrefix>> for AwsIpRanges

source§

fn from(value: BTreeSet<AwsIpPrefix>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more