Enum oaidl::FromSafeArrayError
source · pub enum FromSafeArrayError {
SafeArrayDimsInvalid {
sa_dims: u32,
},
VarTypeDoesNotMatch {
expected: u32,
found: u32,
},
SafeArrayLBoundFailed {
hr: i32,
},
SafeArrayRBoundFailed {
hr: i32,
},
SafeArrayGetVartypeFailed {
hr: i32,
},
ElementConversionFailed {
index: usize,
element: Box<ElementError>,
},
FromVariantError(Box<FromVariantError>),
}
Expand description
Represents the different ways converting from SAFEARRAY
can fail
Variants§
SafeArrayDimsInvalid
Either the safe array dimensions = 0 or > 1 multi-dimensional arrays are not handled.
VarTypeDoesNotMatch
Expected vartype did not match found vartype - runtime consistency check
SafeArrayLBoundFailed
Call to SafeArrayGetLBound failed
SafeArrayRBoundFailed
Call to SafeArrayGetRBound failed
SafeArrayGetVartypeFailed
Call to SafeArrayGetVartype failed
ElementConversionFailed
Fields
§
element: Box<ElementError>
The element error encapsulating the failure
Encapsulates the ElementError
that occurred during conversion
FromVariantError(Box<FromVariantError>)
[from_variant
] call failed
Implementations§
source§impl FromSafeArrayError
impl FromSafeArrayError
sourcepub fn from_element_err<E: Into<ElementError>>(
ee: E,
index: usize
) -> FromSafeArrayError
pub fn from_element_err<E: Into<ElementError>>(
ee: E,
index: usize
) -> FromSafeArrayError
Boxes an ElementError
into a FromSafeArrayError
.
Need the index so a From impl doesn’t apply.
Trait Implementations§
source§impl Debug for FromSafeArrayError
impl Debug for FromSafeArrayError
source§impl Display for FromSafeArrayError
impl Display for FromSafeArrayError
source§impl Fail for FromSafeArrayError
impl Fail for FromSafeArrayError
source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moresource§impl From<FromSafeArrayError> for SafeArrayError
impl From<FromSafeArrayError> for SafeArrayError
source§fn from(fsae: FromSafeArrayError) -> SafeArrayError
fn from(fsae: FromSafeArrayError) -> SafeArrayError
Holds a FromSafeArrayError
with a box. This means conversion is free.
source§impl From<FromVariantError> for FromSafeArrayError
impl From<FromVariantError> for FromSafeArrayError
source§fn from(fve: FromVariantError) -> Self
fn from(fve: FromVariantError) -> Self
Boxes a FromVariantError
into a FromSafeArrElemError
which means the conversion is free.