Struct openstack::EndpointFilters
source · #[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: ValidInterfaces
Acceptable 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) -> EndpointFilterswhere
I: IntoIterator<Item = InterfaceType>,
S: Into<String>,
pub fn new<I, S>(interfaces: I, region: S) -> EndpointFilterswhere I: IntoIterator<Item = InterfaceType>, S: Into<String>,
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)where
T: Into<String>,
pub fn set_region<T>(&mut self, value: T)where T: Into<String>,
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) -> EndpointFilterswhere
T: Into<String>,
pub fn with_region<T>(self, value: T) -> EndpointFilterswhere T: Into<String>,
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 copy 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<EndpointFilters> for EndpointFilters
impl PartialEq<EndpointFilters> for EndpointFilters
source§fn eq(&self, other: &EndpointFilters) -> bool
fn eq(&self, other: &EndpointFilters) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for EndpointFilters
impl StructuralEq for EndpointFilters
impl StructuralPartialEq for EndpointFilters
Auto Trait Implementations§
impl RefUnwindSafe for EndpointFilters
impl Send for EndpointFilters
impl Sync for EndpointFilters
impl Unpin for EndpointFilters
impl UnwindSafe for EndpointFilters
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.