Trait glib::variant::FromVariant

source ·
pub trait FromVariant: Sized + StaticVariantType {
    fn from_variant(variant: &Variant) -> Option<Self>;
}
Expand description

Extracts a value.

Required Methods§

source

fn from_variant(variant: &Variant) -> Option<Self>

Tries to extract a value.

Returns Some if the variant’s type matches Self.

Implementations on Foreign Types§

source§

impl FromVariant for u8

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for i16

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for u16

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for i32

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for u32

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for i64

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for u64

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for f64

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for ()

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for bool

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for String

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for PathBuf

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl FromVariant for OsString

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T: StaticVariantType + FromVariant> FromVariant for Option<T>

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T: FromVariant> FromVariant for Vec<T>

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<K, V, H> FromVariant for HashMap<K, V, H>where
    K: FromVariant + Eq + Hash,
    V: FromVariant,
    H: BuildHasher + Default,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<K, V> FromVariant for BTreeMap<K, V>where
    K: FromVariant + Eq + Ord,
    V: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0> FromVariant for (T0,)where
    T0: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1> FromVariant for (T0, T1)where
    T0: FromVariant,
    T1: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2> FromVariant for (T0, T1, T2)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3> FromVariant for (T0, T1, T2, T3)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4> FromVariant for (T0, T1, T2, T3, T4)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5> FromVariant for (T0, T1, T2, T3, T4, T5)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6> FromVariant for (T0, T1, T2, T3, T4, T5, T6)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,
    T9: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,
    T9: FromVariant,
    T10: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,
    T9: FromVariant,
    T10: FromVariant,
    T11: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,
    T9: FromVariant,
    T10: FromVariant,
    T11: FromVariant,
    T12: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,
    T9: FromVariant,
    T10: FromVariant,
    T11: FromVariant,
    T12: FromVariant,
    T13: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,
    T9: FromVariant,
    T10: FromVariant,
    T11: FromVariant,
    T12: FromVariant,
    T13: FromVariant,
    T14: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> FromVariant for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)where
    T0: FromVariant,
    T1: FromVariant,
    T2: FromVariant,
    T3: FromVariant,
    T4: FromVariant,
    T5: FromVariant,
    T6: FromVariant,
    T7: FromVariant,
    T8: FromVariant,
    T9: FromVariant,
    T10: FromVariant,
    T11: FromVariant,
    T12: FromVariant,
    T13: FromVariant,
    T14: FromVariant,
    T15: FromVariant,

source§

fn from_variant(variant: &Variant) -> Option<Self>

Implementors§