#[non_exhaustive]pub struct EndpointFilters {
pub interfaces: ValidInterfaces,
pub region: Option<String>,
}Expand description
Endpoint filters for looking up endpoints.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.interfaces: ValidInterfacesAcceptable endpoint interfaces in the reverse priority order.
region: Option<String>Cloud region.
Implementations§
Source§impl EndpointFilters
impl EndpointFilters
Sourcepub fn new<I, S>(interfaces: I, region: S) -> EndpointFilters
pub fn new<I, S>(interfaces: I, region: S) -> EndpointFilters
Create filters with interfaces and region.
Hint: use default to create empty filters (and with_* methods to populate it).
Sourcepub fn check(&self, endpoint: &Endpoint) -> bool
pub fn check(&self, endpoint: &Endpoint) -> bool
Whether the filters match the provided endpoint.
Sourcepub fn set_interfaces<T>(&mut self, value: T)where
T: Into<ValidInterfaces>,
pub fn set_interfaces<T>(&mut self, value: T)where
T: Into<ValidInterfaces>,
Set one or more valid interfaces.
Hint: because of the generic argument can be used with one InterfaceType as well.
Sourcepub fn set_region<T>(&mut self, value: T)
pub fn set_region<T>(&mut self, value: T)
Set region.
Sourcepub fn with_interfaces<T>(self, value: T) -> EndpointFilterswhere
T: Into<ValidInterfaces>,
pub fn with_interfaces<T>(self, value: T) -> EndpointFilterswhere
T: Into<ValidInterfaces>,
Add one or more valid interfaces.
Hint: because of the generic argument can be used with one InterfaceType as well.
Sourcepub fn with_region<T>(self, value: T) -> EndpointFilters
pub fn with_region<T>(self, value: T) -> EndpointFilters
Add a region.
Trait Implementations§
Source§impl Clone for EndpointFilters
impl Clone for EndpointFilters
Source§fn clone(&self) -> EndpointFilters
fn clone(&self) -> EndpointFilters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EndpointFilters
impl Debug for EndpointFilters
Source§impl Default for EndpointFilters
impl Default for EndpointFilters
Source§fn default() -> EndpointFilters
fn default() -> EndpointFilters
Returns the “default value” for a type. Read more
Source§impl Hash for EndpointFilters
impl Hash for EndpointFilters
Source§impl PartialEq for EndpointFilters
impl PartialEq for EndpointFilters
impl Eq for EndpointFilters
impl StructuralPartialEq for EndpointFilters
Auto Trait Implementations§
impl Freeze for EndpointFilters
impl RefUnwindSafe for EndpointFilters
impl Send for EndpointFilters
impl Sync for EndpointFilters
impl Unpin for EndpointFilters
impl UnwindSafe for EndpointFilters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.