Trait glib::variant::FromVariant
source · [−]pub trait FromVariant: Sized + StaticVariantType {
fn from_variant(variant: &Variant) -> Option<Self>;
}
Expand description
Extracts a value.
Required methods
fn from_variant(variant: &Variant) -> Option<Self>
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
sourceimpl FromVariant for u8
impl FromVariant for u8
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for i16
impl FromVariant for i16
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for u16
impl FromVariant for u16
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for i32
impl FromVariant for i32
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for u32
impl FromVariant for u32
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for i64
impl FromVariant for i64
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for u64
impl FromVariant for u64
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for f64
impl FromVariant for f64
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for ()
impl FromVariant for ()
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for bool
impl FromVariant for bool
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for String
impl FromVariant for String
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for PathBuf
impl FromVariant for PathBuf
Portability Warning
This impl is for a platform-specific type. Any variants serialized from this type should be deserialized on the same machine.
fn from_variant(variant: &Variant) -> Option<Self>
sourceimpl FromVariant for OsString
impl FromVariant for OsString
Portability Warning
This impl is for a platform-specific type. Any variants serialized from this type should be deserialized on the same machine.