Trait glib::variant::FromVariant

source ·
pub trait FromVariant: Sized + StaticVariantType {
    // Required method
    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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromVariant for bool

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 i16

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 i64

source§

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

source§

impl FromVariant for u8

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 u32

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

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 OsString

source§

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

source§

impl FromVariant for PathBuf

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<K, V, H> FromVariant for HashMap<K, V, H>

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)

source§

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

source§

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

source§

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

source§

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

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)

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)

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)

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)

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)

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)

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)

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)

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)

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)

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<T: StaticVariantType + FromVariant> FromVariant for Option<T>

source§

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

Implementors§