Trait oaidl::SafeArrayExt

source ·
pub trait SafeArrayExt<T: SafeArrayElement> {
    fn into_safearray(&mut self) -> Result<Ptr<SAFEARRAY>, SafeArrayError>;
    fn from_safearray(psa: Ptr<SAFEARRAY>) -> Result<Vec<T>, SafeArrayError>;
}
Expand description

Workhorse trait and main interface for converting to/from SAFEARRAY. Default impl is on ExactSizeIterator<Item=SafeArrayElement>

Required Methods§

Use t.into_safearray() to convert a type into a SAFEARRAY

Use T::from_safearray(psa) to convert a safearray pointer into the relevant T

Implementors§

Blanket implementation, requires that TryConvert is implement between Itr::Item and Elem where Elem is the target type for conversion into/from the SAFEARRAY