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>
source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
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.
Auto Trait Implementations§
impl RefUnwindSafe for FromSafeArrayError
impl Send for FromSafeArrayError
impl Sync for FromSafeArrayError
impl Unpin for FromSafeArrayError
impl UnwindSafe for FromSafeArrayError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T, F> TryConvert<T, F> for Twhere
T: From<T>,
F: Fail,
impl<T, F> TryConvert<T, F> for Twhere T: From<T>, F: Fail,
source§fn try_convert(val: T) -> Result<T, F>
fn try_convert(val: T) -> Result<T, F>
Blanket TryConvert implementation wherever a From