Struct glib::variant::Variant [] [src]

pub struct Variant(_);

A generic immutable value capable of carrying various types.

See the module documentation for more details.

Methods

impl Variant
[src]

Returns the type of the value.

Returns true if the type of the value corresponds to T.

Tries to extract a value of type T.

Returns Some if T matches the variant's type.

Tries to extract a &str.

Returns Some if the variant has a string type (s, o or g type strings).

Trait Implementations

impl Clone for Variant
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Send for Variant
[src]

impl Sync for Variant
[src]

impl Debug for Variant
[src]

Formats the value using the given formatter.

impl Display for Variant
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Variant
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Variant
[src]

impl Hash for Variant
[src]

Feeds this value into the given [Hasher]. Read more

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

impl<T: ToVariant> From<T> for Variant
[src]

Performs the conversion.