[][src]Crate win_variant

win-variant

win-variant is a crate to improve the ergonomics of working with VARIANTS from winapi.

The crate uses enums and conversion traits to allow for modern rust usage as well as provides utilities to easily free VARIANTS correctly.

Structs

SafeArray

SafeArray provides an ergnomic structure that allows for converting SAFEARRAY data structures from a VARIANT into Vec or ArrayD. The structure also destroys the SAFEARRAY when the SafeArray instance is dropped.

Enums

VariantArg

VariantArg is a type to simplify the conversion of rust types into variants that are used by windows APIs. Make sure to use the free_variant(s) functions if you convert the VariantArg to VARIANT.

VariantArgError
VariantResult

VariantResult is a tyoe that can be converted from VARIANT to automatically convert the VARIANT value to a rust type that is easier to work with. The VARIANT can be dropped after the conversion as the data is copied into the VariantResult.

VariantResultError

Functions

free_variant

free_variant is a utility to properly free the allocated resources of a variant.

free_variants

free_variants is a utility to properly free the allocated resources of variants.