Enum miau::configuration::Key[][src]

pub enum Key {
    Array(usize),
    Map(String),
}

Configuration key

It comes in two flavours - for arrays and maps.

Variants

Array(usize)

Variant that is used to index into arrays

Map(String)

Variant that is used as a key in maps

Implementations

impl Key[src]

pub fn unwrap_map(&self) -> String[src]

Unwraps underlying string in map variant

Panics

Panics if Key variant is Array

pub fn unwrap_array(&self) -> usize[src]

Unwraps underlying usize in map variant

Panics

Panics if Key variant is Map

Trait Implementations

impl Clone for Key[src]

impl Debug for Key[src]

impl<'de> Deserialize<'de> for Key[src]

impl Display for Key[src]

impl Eq for Key[src]

impl From<&'_ str> for Key[src]

impl From<String> for Key[src]

impl From<u16> for Key[src]

impl From<u32> for Key[src]

impl From<u64> for Key[src]

impl From<u8> for Key[src]

impl From<usize> for Key[src]

impl Hash for Key[src]

impl PartialEq<Key> for Key[src]

impl Serialize for Key[src]

impl StructuralEq for Key[src]

impl StructuralPartialEq for Key[src]

Auto Trait Implementations

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<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> 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> ToString for T where
    T: Display + ?Sized
[src]

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.