[][src]Struct openstack::EndpointFilters

#[non_exhaustive]pub struct EndpointFilters {
    pub interfaces: ValidInterfaces,
    pub region: Option<String>,
}

Endpoint filters for looking up endpoints.

Fields (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

impl EndpointFilters[src]

pub fn new<I, S>(interfaces: I, region: S) -> EndpointFilters where
    I: IntoIterator<Item = InterfaceType>,
    S: Into<String>, 
[src]

Create filters with interfaces and region.

Hint: use default to create empty filters (and with_* methods to populate it).

pub fn check(&self, endpoint: &Endpoint) -> bool[src]

Whether the filters match the provided endpoint.

pub fn find_in_catalog(
    &self,
    catalog: &[CatalogRecord],
    service_type: &str
) -> Result<Url, Error>
[src]

Extract a URL from the service catalog.

pub fn set_interfaces<T>(&mut self, value: T) where
    T: Into<ValidInterfaces>, 
[src]

Set one or more valid interfaces.

Hint: because of the generic argument can be used with one InterfaceType as well.

pub fn set_region<T>(&mut self, value: T) where
    T: Into<String>, 
[src]

Set region.

pub fn with_interfaces<T>(self, value: T) -> EndpointFilters where
    T: Into<ValidInterfaces>, 
[src]

Add one or more valid interfaces.

Hint: because of the generic argument can be used with one InterfaceType as well.

pub fn with_region<T>(self, value: T) -> EndpointFilters where
    T: Into<String>, 
[src]

Add a region.

Trait Implementations

impl Clone for EndpointFilters[src]

impl Debug for EndpointFilters[src]

impl Default for EndpointFilters[src]

impl Eq for EndpointFilters[src]

impl Hash for EndpointFilters[src]

impl PartialEq<EndpointFilters> for EndpointFilters[src]

impl StructuralEq for EndpointFilters[src]

impl StructuralPartialEq for EndpointFilters[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.