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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Sync 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 Send for VariantType[src]

impl Drop for VariantType[src]

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

impl Eq for VariantType[src]

impl Display for VariantType[src]

impl Deref for VariantType[src]

type Target = VariantTy

The resulting type after dereferencing.

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

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> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.