Struct daylio::MoodConfig[][src]

pub struct MoodConfig { /* fields omitted */ }

Config representing possible moods.

Implementations

impl MoodConfig[src]

pub fn new(moods: Vec<(String, String)>) -> Self[src]

Creates a new mood config from a list of tuples containing (name, color).

pub fn get<N: AsRef<str>>(&self, name: N) -> Option<&Mood>[src]

Tries to get the Mood by it’s name from this config.

Trait Implementations

impl Clone for MoodConfig[src]

impl Debug for MoodConfig[src]

impl Default for MoodConfig[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> 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, 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.