[][src]Enum openstack::IdOrName

pub enum IdOrName {
    Id(String),
    Name(String),
}

A reference to a resource by its ID or name.

Variants

Id(String)

Resource ID.

Name(String)

Resource name.

Implementations

impl IdOrName[src]

pub fn from_id<T>(id: T) -> IdOrName where
    T: Into<String>, 
[src]

Create an ID from anything that can be converted to a string.

pub fn from_name<T>(name: T) -> IdOrName where
    T: Into<String>, 
[src]

Create a name from anything that can be converted to a string.

Trait Implementations

impl Clone for IdOrName[src]

impl Debug for IdOrName[src]

impl Eq for IdOrName[src]

impl Hash for IdOrName[src]

impl PartialEq<IdOrName> for IdOrName[src]

impl Serialize for IdOrName[src]

impl StructuralEq for IdOrName[src]

impl StructuralPartialEq for IdOrName[src]

Auto Trait Implementations

impl RefUnwindSafe for IdOrName

impl Send for IdOrName

impl Sync for IdOrName

impl Unpin for IdOrName

impl UnwindSafe for IdOrName

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.