Struct oaidl::Variant[][src]

pub struct Variant<T: VariantExt>(_);

Helper struct to wrap a VARIANT compatible type into a VT_VARIANT marked VARIANT

Methods

impl<T: VariantExt> Variant<T>
[src]

Variant<T: VariantExt> type to wrap an impl of VariantExt - creates a VARIANT of VT_VARIANT which wraps an inner variant that points to T.

default constructor

Get access to the inner value and the Variant is consumed

Borrow reference to inner value

Borrow mutable reference to inner value

Converts the Variant<T> into a Ptr<VARIANT> Returns Result<Ptr<VARIANT>, IntoVariantError>

Converts Ptr<VARIANT> into Variant<T> Returns Result<Variant<T>>, FromVariantError>

Trait Implementations

impl<T: VariantExt> SafeArrayElement for Variant<T>
[src]

SFTYPE: u32 = VT_VARIANT

This is the VT value used to create the SAFEARRAY

gets a type from the safearray at the specified index (default impls use SafeArrayGetElement)

puts a type into the safearray at the specified index (default impls use SafeArrayPutElement)

impl<T: Clone + VariantExt> Clone for Variant<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy + VariantExt> Copy for Variant<T>
[src]

impl<T: Debug + VariantExt> Debug for Variant<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Eq + VariantExt> Eq for Variant<T>
[src]

impl<T: Hash + VariantExt> Hash for Variant<T>
[src]

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

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

impl<T: Ord + VariantExt> Ord for Variant<T>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<T: PartialEq + VariantExt> PartialEq for Variant<T>
[src]

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

This method tests for !=.

impl<T: PartialOrd + VariantExt> PartialOrd for Variant<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: VariantExt> AsRef<T> for Variant<T>
[src]

Performs the conversion.

impl<T: VariantExt> AsMut<T> for Variant<T>
[src]

Performs the conversion.

impl<T: VariantExt> VariantExt for Variant<T>
[src]

VARTYPE: u32 = VT_VARIANT

VARTYPE constant value for the type

Call this associated function on a Ptr to obtain a value T

Convert a value of type T into a Ptr

Auto Trait Implementations

impl<T> Send for Variant<T> where
    T: Send

impl<T> Sync for Variant<T> where
    T: Sync