Struct gmime::Variant[]

pub struct Variant(_);

A generic immutable value capable of carrying various types.

See the module documentation for more details.

Methods

impl Variant

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 Sync for Variant

impl Hash for Variant

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

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

impl PartialEq<Variant> for Variant

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

impl Clone for Variant

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Variant

Formats the value using the given formatter. Read more

impl<T> From<T> for Variant where
    T: ToVariant, 

Performs the conversion.

impl Display for Variant

Formats the value using the given formatter. Read more

impl StaticType for Variant

Returns the type identifier of Self.

impl Send for Variant