[][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 Drop for VariantType[src]

impl Clone for VariantType[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for VariantType[src]

impl Sync for VariantType[src]

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

impl Send for VariantType[src]

impl PartialEq<VariantType> for VariantType[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

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

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Display for VariantType[src]

impl Deref for VariantType[src]

type Target = VariantTy

The resulting type after dereferencing.

impl Debug for VariantType[src]

impl Hash for VariantType[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Borrow<VariantTy> for VariantType[src]

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> From<T> for T[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> 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]