[][src]Struct win_variant::SafeArray

pub struct SafeArray { /* fields omitted */ }

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.

If the SafeArray is converted to a VARIANT the memory is now owned by VARIANT and free_variant should be called on the VARIANT to properly release all the memory.

Implementations

impl SafeArray[src]

pub fn new_vector(
    vt: VARTYPE,
    lower_bound: LONG,
    length: u32
) -> Result<SafeArray, SafeArrayError>
[src]

Creates a new vector based safe array.

pub fn destroy(&mut self) -> Result<(), SafeArrayError>[src]

destroys the safe array properly, do not call this if the array was passed as an argument for a VariantArg.

pub fn dimensions_count(&self) -> Result<u16, SafeArrayError>[src]

Reutrns the number of dimensions in the array

pub fn dimension_lower_bound(
    &self,
    dimension: u32
) -> Result<LONG, SafeArrayError>
[src]

Gets the lower bound of the dimension, dimension index starts at 1

pub fn dimension_upper_bound(
    &self,
    dimension: u32
) -> Result<LONG, SafeArrayError>
[src]

Gets the upper bound of the dimension, dimension index starts at 1

pub fn dimensions(&self) -> Result<Vec<SAFEARRAYBOUND>, SafeArrayError>[src]

Gets all the details of the dimensions in the array.

pub fn get_vartype(&self) -> Result<VARTYPE, SafeArrayError>[src]

Gets the data type for the elements in the array

Trait Implementations

impl Debug for SafeArray[src]

impl Drop for SafeArray[src]

impl From<*mut SAFEARRAY> for SafeArray[src]

impl Into<VARIANT> for SafeArray[src]

impl TryFrom<&'_ ArrayBase<OwnedRepr<&'_ String>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<&'_ str>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<String>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<bool>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<f32>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<f64>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<i16>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<i32>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<i64>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<u16>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<u32>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ ArrayBase<OwnedRepr<u64>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<&'_ String, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<&'_ str, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<String, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<bool, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<f32, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<f64, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<i16, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<i32, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<i64, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<u16, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<u32, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryFrom<&'_ Vec<u64, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<String>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<bool>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<f32>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<f64>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<i16>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<i32>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<i64>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<u16>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<u32>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<ArrayBase<OwnedRepr<u64>, Dim<IxDynImpl>>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<String, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<bool, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<f32, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<f64, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<i16, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<i32, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<i64, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<u16, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<u32, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

impl TryInto<Vec<u64, Global>> for SafeArray[src]

type Error = SafeArrayError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.