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: ValidInterfacesAcceptable endpoint interfaces in the reverse priority order.
region: Option<String>Cloud region.
Implementations
sourceimpl 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 find_in_catalog(
&self,
catalog: &[CatalogRecord],
service_type: &str
) -> Result<Url, Error>
pub fn find_in_catalog(
&self,
catalog: &[CatalogRecord],
service_type: &str
) -> Result<Url, Error>
Extract a URL from the service catalog.
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
sourceimpl Clone for EndpointFilters
impl Clone for EndpointFilters
sourcefn clone(&self) -> EndpointFilters
fn clone(&self) -> EndpointFilters
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for EndpointFilters
impl Debug for EndpointFilters
sourceimpl Default for EndpointFilters
impl Default for EndpointFilters
sourcefn default() -> EndpointFilters
fn default() -> EndpointFilters
Returns the “default value” for a type. Read more
sourceimpl Hash for EndpointFilters
impl Hash for EndpointFilters
sourceimpl PartialEq<EndpointFilters> for EndpointFilters
impl PartialEq<EndpointFilters> for EndpointFilters
sourcefn eq(&self, other: &EndpointFilters) -> bool
fn eq(&self, other: &EndpointFilters) -> bool
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.