[][src]Struct glib::VariantType

pub struct VariantType { /* fields omitted */ }

Describes Variant types.

The Variant type system (based on the D-Bus one) describes types with "type strings". VariantType is an owned immutable type string (you can think of it as a Box<str> statically guaranteed to be a valid type string), &VariantTy is a borrowed one (like &str).

Methods

impl VariantType[src]

pub fn new(type_string: &str) -> Result<VariantType, ()>[src]

Tries to create a VariantType from a string slice.

Returns Ok if the string is a valid type string, Err otherwise.

Methods from Deref<Target = VariantTy>

pub fn to_str(&self) -> &str[src]

Converts to a string slice.

Trait Implementations

impl StaticType for VariantType[src]

impl<'a> FromValueOptional<'a> for VariantType[src]

impl SetValueOptional for VariantType[src]

impl SetValue for VariantType[src]

impl Send for VariantType[src]

impl Drop for VariantType[src]

impl<'a> Into<Cow<'a, VariantTy>> for VariantType[src]

impl Eq for VariantType[src]

impl Sync for VariantType[src]

impl Clone for VariantType[src]

impl PartialEq<VariantType> for VariantType[src]

impl<'a, 'b> PartialEq<VariantTy> for VariantType[src]

impl<'a, 'b> PartialEq<VariantType> for VariantTy[src]

impl<'a, 'b> PartialEq<&'a VariantTy> for VariantType[src]

impl<'a, 'b> PartialEq<VariantType> for &'a VariantTy[src]

impl<'a, 'b> PartialEq<Cow<'a, VariantTy>> for VariantType[src]

impl<'a, 'b> PartialEq<VariantType> for Cow<'a, VariantTy>[src]

impl<'a, 'b> PartialEq<str> for VariantType[src]

impl<'a, 'b> PartialEq<VariantType> for str[src]

impl<'a, 'b> PartialEq<&'a str> for VariantType[src]

impl<'a, 'b> PartialEq<VariantType> for &'a str[src]

impl<'a, 'b> PartialEq<String> for VariantType[src]

impl<'a, 'b> PartialEq<VariantType> for String[src]

impl Hash for VariantType[src]

impl Deref for VariantType[src]

type Target = VariantTy

The resulting type after dereferencing.

impl Debug for VariantType[src]

impl Display for VariantType[src]

impl Borrow<VariantTy> for VariantType[src]

Auto Trait Implementations

impl Unpin for VariantType

impl UnwindSafe for VariantType

impl RefUnwindSafe for VariantType

Blanket Implementations

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]