Trait oaidl::SafeArrayExt [−][src]
pub trait SafeArrayExt<T: SafeArrayElement> { fn into_safearray(&mut self) -> Result<Ptr<SAFEARRAY>, IntoSafeArrayError>; fn from_safearray(psa: *mut SAFEARRAY) -> Result<Vec<T>, FromSafeArrayError>; }
Workhorse trait and main interface for converting to/from SAFEARRAY
Default impl is on Vec<T: SafeArrayElement>
Required Methods
fn into_safearray(&mut self) -> Result<Ptr<SAFEARRAY>, IntoSafeArrayError>
Use t.into_safearray()
to convert a type into a SAFEARRAY
fn from_safearray(psa: *mut SAFEARRAY) -> Result<Vec<T>, FromSafeArrayError>
Use T::from_safearray(psa)
to convert a safearray pointer into the relevant T
Implementations on Foreign Types
impl<T: SafeArrayElement> SafeArrayExt<T> for Vec<T>
[src]
impl<T: SafeArrayElement> SafeArrayExt<T> for Vec<T>
fn into_safearray(&mut self) -> Result<Ptr<SAFEARRAY>, IntoSafeArrayError>
[src]
fn into_safearray(&mut self) -> Result<Ptr<SAFEARRAY>, IntoSafeArrayError>
fn from_safearray(psa: *mut SAFEARRAY) -> Result<Vec<T>, FromSafeArrayError>
[src]
fn from_safearray(psa: *mut SAFEARRAY) -> Result<Vec<T>, FromSafeArrayError>