Trait oaidl::TryConvert
source · pub trait TryConvert<T, F>where
Self: Sized,
F: Fail,{
fn try_convert(val: T) -> Result<Self, F>;
}
Expand description
Pseudo-From
trait because of orphan rules
Required Methods§
sourcefn try_convert(val: T) -> Result<Self, F>
fn try_convert(val: T) -> Result<Self, F>
Utility method which can fail.
Implementations on Foreign Types§
source§impl TryConvert<Ptr<IUnknown>, ElementError> for *mut IUnknown
impl TryConvert<Ptr<IUnknown>, ElementError> for *mut IUnknown
source§fn try_convert(p: Ptr<IUnknown>) -> Result<Self, ElementError>
fn try_convert(p: Ptr<IUnknown>) -> Result<Self, ElementError>
Unwraps the Ptr with [as_ptr()
]
source§impl TryConvert<Ptr<IDispatch>, ElementError> for *mut IDispatch
impl TryConvert<Ptr<IDispatch>, ElementError> for *mut IDispatch
source§fn try_convert(p: Ptr<IDispatch>) -> Result<Self, ElementError>
fn try_convert(p: Ptr<IDispatch>) -> Result<Self, ElementError>
Unwraps the Ptr with [as_ptr()
]
source§impl TryConvert<UString<u16>, IntoVariantError> for BSTR
impl TryConvert<UString<u16>, IntoVariantError> for BSTR
source§fn try_convert(u: U16String) -> Result<Self, IntoVariantError>
fn try_convert(u: U16String) -> Result<Self, IntoVariantError>
source§impl TryConvert<*mut u16, FromVariantError> for U16String
impl TryConvert<*mut u16, FromVariantError> for U16String
source§fn try_convert(p: BSTR) -> Result<Self, FromVariantError>
fn try_convert(p: BSTR) -> Result<Self, FromVariantError>
source§impl TryConvert<UString<u16>, SafeArrayError> for BSTR
impl TryConvert<UString<u16>, SafeArrayError> for BSTR
source§fn try_convert(u: U16String) -> Result<Self, SafeArrayError>
fn try_convert(u: U16String) -> Result<Self, SafeArrayError>
source§impl TryConvert<UString<u16>, ElementError> for BSTR
impl TryConvert<UString<u16>, ElementError> for BSTR
source§fn try_convert(u: U16String) -> Result<Self, ElementError>
fn try_convert(u: U16String) -> Result<Self, ElementError>
source§impl TryConvert<*mut u16, ElementError> for U16String
impl TryConvert<*mut u16, ElementError> for U16String
source§fn try_convert(ptr: BSTR) -> Result<Self, ElementError>
fn try_convert(ptr: BSTR) -> Result<Self, ElementError>
source§impl TryConvert<Currency, IntoVariantError> for CY
impl TryConvert<Currency, IntoVariantError> for CY
source§fn try_convert(val: Currency) -> Result<Self, IntoVariantError>
fn try_convert(val: Currency) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c Currency, IntoVariantError> for CY
impl<'c> TryConvert<&'c Currency, IntoVariantError> for CY
source§fn try_convert(val: &'c Currency) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c Currency) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut Currency, IntoVariantError> for CY
impl<'c> TryConvert<&'c mut Currency, IntoVariantError> for CY
source§fn try_convert(val: &'c mut Currency) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut Currency) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<Currency, SafeArrayError> for CY
impl TryConvert<Currency, SafeArrayError> for CY
source§fn try_convert(val: Currency) -> Result<Self, SafeArrayError>
fn try_convert(val: Currency) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<Currency, ElementError> for CY
impl TryConvert<Currency, ElementError> for CY
source§fn try_convert(val: Currency) -> Result<Self, ElementError>
fn try_convert(val: Currency) -> Result<Self, ElementError>
Does not return any errors.
source§impl TryConvert<Box<Currency, Global>, IntoVariantError> for *mut CY
impl TryConvert<Box<Currency, Global>, IntoVariantError> for *mut CY
fn try_convert(b: Box<Currency>) -> Result<Self, IntoVariantError>
source§impl TryConvert<*mut CY, FromVariantError> for Box<Currency>
impl TryConvert<*mut CY, FromVariantError> for Box<Currency>
fn try_convert(inner: *mut CY) -> Result<Self, FromVariantError>
source§impl TryConvert<Date, IntoVariantError> for f64
impl TryConvert<Date, IntoVariantError> for f64
source§fn try_convert(val: Date) -> Result<Self, IntoVariantError>
fn try_convert(val: Date) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c Date, IntoVariantError> for f64
impl<'c> TryConvert<&'c Date, IntoVariantError> for f64
source§fn try_convert(val: &'c Date) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c Date) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut Date, IntoVariantError> for f64
impl<'c> TryConvert<&'c mut Date, IntoVariantError> for f64
source§fn try_convert(val: &'c mut Date) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut Date) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<Date, SafeArrayError> for f64
impl TryConvert<Date, SafeArrayError> for f64
source§fn try_convert(val: Date) -> Result<Self, SafeArrayError>
fn try_convert(val: Date) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<Date, ElementError> for f64
impl TryConvert<Date, ElementError> for f64
source§fn try_convert(val: Date) -> Result<Self, ElementError>
fn try_convert(val: Date) -> Result<Self, ElementError>
Does not return any errors.
source§impl TryConvert<Box<Date, Global>, IntoVariantError> for *mut f64
impl TryConvert<Box<Date, Global>, IntoVariantError> for *mut f64
fn try_convert(b: Box<Date>) -> Result<Self, IntoVariantError>
source§impl TryConvert<*mut f64, FromVariantError> for Box<Date>
impl TryConvert<*mut f64, FromVariantError> for Box<Date>
fn try_convert(inner: *mut f64) -> Result<Self, FromVariantError>
source§impl TryConvert<DecWrapper, IntoVariantError> for DECIMAL
impl TryConvert<DecWrapper, IntoVariantError> for DECIMAL
source§fn try_convert(val: DecWrapper) -> Result<Self, IntoVariantError>
fn try_convert(val: DecWrapper) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c DecWrapper, IntoVariantError> for DECIMAL
impl<'c> TryConvert<&'c DecWrapper, IntoVariantError> for DECIMAL
source§fn try_convert(val: &'c DecWrapper) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c DecWrapper) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut DecWrapper, IntoVariantError> for DECIMAL
impl<'c> TryConvert<&'c mut DecWrapper, IntoVariantError> for DECIMAL
source§fn try_convert(val: &'c mut DecWrapper) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut DecWrapper) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<DecWrapper, SafeArrayError> for DECIMAL
impl TryConvert<DecWrapper, SafeArrayError> for DECIMAL
source§fn try_convert(val: DecWrapper) -> Result<Self, SafeArrayError>
fn try_convert(val: DecWrapper) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<DecWrapper, ElementError> for DECIMAL
impl TryConvert<DecWrapper, ElementError> for DECIMAL
source§fn try_convert(val: DecWrapper) -> Result<Self, ElementError>
fn try_convert(val: DecWrapper) -> Result<Self, ElementError>
Does not return any errors.
source§impl TryConvert<VariantBool, IntoVariantError> for bool
impl TryConvert<VariantBool, IntoVariantError> for bool
source§fn try_convert(val: VariantBool) -> Result<Self, IntoVariantError>
fn try_convert(val: VariantBool) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c VariantBool, IntoVariantError> for bool
impl<'c> TryConvert<&'c VariantBool, IntoVariantError> for bool
source§fn try_convert(val: &'c VariantBool) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c VariantBool) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut VariantBool, IntoVariantError> for bool
impl<'c> TryConvert<&'c mut VariantBool, IntoVariantError> for bool
source§fn try_convert(val: &'c mut VariantBool) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut VariantBool) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<VariantBool, SafeArrayError> for bool
impl TryConvert<VariantBool, SafeArrayError> for bool
source§fn try_convert(val: VariantBool) -> Result<Self, SafeArrayError>
fn try_convert(val: VariantBool) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<VariantBool, ElementError> for bool
impl TryConvert<VariantBool, ElementError> for bool
source§fn try_convert(val: VariantBool) -> Result<Self, ElementError>
fn try_convert(val: VariantBool) -> Result<Self, ElementError>
Does not return any errors.
source§impl TryConvert<VariantBool, IntoVariantError> for VARIANT_BOOL
impl TryConvert<VariantBool, IntoVariantError> for VARIANT_BOOL
source§fn try_convert(val: VariantBool) -> Result<Self, IntoVariantError>
fn try_convert(val: VariantBool) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c VariantBool, IntoVariantError> for VARIANT_BOOL
impl<'c> TryConvert<&'c VariantBool, IntoVariantError> for VARIANT_BOOL
source§fn try_convert(val: &'c VariantBool) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c VariantBool) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut VariantBool, IntoVariantError> for VARIANT_BOOL
impl<'c> TryConvert<&'c mut VariantBool, IntoVariantError> for VARIANT_BOOL
source§fn try_convert(val: &'c mut VariantBool) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut VariantBool) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<VariantBool, SafeArrayError> for VARIANT_BOOL
impl TryConvert<VariantBool, SafeArrayError> for VARIANT_BOOL
source§fn try_convert(val: VariantBool) -> Result<Self, SafeArrayError>
fn try_convert(val: VariantBool) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<VariantBool, ElementError> for VARIANT_BOOL
impl TryConvert<VariantBool, ElementError> for VARIANT_BOOL
source§fn try_convert(val: VariantBool) -> Result<Self, ElementError>
fn try_convert(val: VariantBool) -> Result<Self, ElementError>
Does not return any errors.
source§impl TryConvert<Box<VariantBool, Global>, IntoVariantError> for *mut VARIANT_BOOL
impl TryConvert<Box<VariantBool, Global>, IntoVariantError> for *mut VARIANT_BOOL
fn try_convert(b: Box<VariantBool>) -> Result<Self, IntoVariantError>
source§impl TryConvert<*mut i16, FromVariantError> for Box<VariantBool>
impl TryConvert<*mut i16, FromVariantError> for Box<VariantBool>
fn try_convert(inner: *mut VARIANT_BOOL) -> Result<Self, FromVariantError>
source§impl TryConvert<*mut i16, ConversionError> for Box<VariantBool>
impl TryConvert<*mut i16, ConversionError> for Box<VariantBool>
fn try_convert(p: *mut VARIANT_BOOL) -> Result<Self, ConversionError>
source§impl TryConvert<Int, IntoVariantError> for i32
impl TryConvert<Int, IntoVariantError> for i32
source§fn try_convert(val: Int) -> Result<Self, IntoVariantError>
fn try_convert(val: Int) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c Int, IntoVariantError> for i32
impl<'c> TryConvert<&'c Int, IntoVariantError> for i32
source§fn try_convert(val: &'c Int) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c Int) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut Int, IntoVariantError> for i32
impl<'c> TryConvert<&'c mut Int, IntoVariantError> for i32
source§fn try_convert(val: &'c mut Int) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut Int) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<Int, SafeArrayError> for i32
impl TryConvert<Int, SafeArrayError> for i32
source§fn try_convert(val: Int) -> Result<Self, SafeArrayError>
fn try_convert(val: Int) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<Int, ElementError> for i32
impl TryConvert<Int, ElementError> for i32
source§fn try_convert(val: Int) -> Result<Self, ElementError>
fn try_convert(val: Int) -> Result<Self, ElementError>
Does not return any errors.
source§impl TryConvert<Box<Int, Global>, IntoVariantError> for *mut i32
impl TryConvert<Box<Int, Global>, IntoVariantError> for *mut i32
fn try_convert(b: Box<Int>) -> Result<Self, IntoVariantError>
source§impl TryConvert<*mut i32, FromVariantError> for Box<Int>
impl TryConvert<*mut i32, FromVariantError> for Box<Int>
fn try_convert(inner: *mut i32) -> Result<Self, FromVariantError>
source§impl TryConvert<UInt, IntoVariantError> for u32
impl TryConvert<UInt, IntoVariantError> for u32
source§fn try_convert(val: UInt) -> Result<Self, IntoVariantError>
fn try_convert(val: UInt) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c UInt, IntoVariantError> for u32
impl<'c> TryConvert<&'c UInt, IntoVariantError> for u32
source§fn try_convert(val: &'c UInt) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c UInt) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut UInt, IntoVariantError> for u32
impl<'c> TryConvert<&'c mut UInt, IntoVariantError> for u32
source§fn try_convert(val: &'c mut UInt) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut UInt) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<UInt, SafeArrayError> for u32
impl TryConvert<UInt, SafeArrayError> for u32
source§fn try_convert(val: UInt) -> Result<Self, SafeArrayError>
fn try_convert(val: UInt) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<UInt, ElementError> for u32
impl TryConvert<UInt, ElementError> for u32
source§fn try_convert(val: UInt) -> Result<Self, ElementError>
fn try_convert(val: UInt) -> Result<Self, ElementError>
Does not return any errors.
source§impl TryConvert<Box<UInt, Global>, IntoVariantError> for *mut u32
impl TryConvert<Box<UInt, Global>, IntoVariantError> for *mut u32
fn try_convert(b: Box<UInt>) -> Result<Self, IntoVariantError>
source§impl TryConvert<*mut u32, FromVariantError> for Box<UInt>
impl TryConvert<*mut u32, FromVariantError> for Box<UInt>
fn try_convert(inner: *mut u32) -> Result<Self, FromVariantError>
source§impl TryConvert<SCode, IntoVariantError> for i32
impl TryConvert<SCode, IntoVariantError> for i32
source§fn try_convert(val: SCode) -> Result<Self, IntoVariantError>
fn try_convert(val: SCode) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c SCode, IntoVariantError> for i32
impl<'c> TryConvert<&'c SCode, IntoVariantError> for i32
source§fn try_convert(val: &'c SCode) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c SCode) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl<'c> TryConvert<&'c mut SCode, IntoVariantError> for i32
impl<'c> TryConvert<&'c mut SCode, IntoVariantError> for i32
source§fn try_convert(val: &'c mut SCode) -> Result<Self, IntoVariantError>
fn try_convert(val: &'c mut SCode) -> Result<Self, IntoVariantError>
Does not return any errors.
source§impl TryConvert<SCode, SafeArrayError> for i32
impl TryConvert<SCode, SafeArrayError> for i32
source§fn try_convert(val: SCode) -> Result<Self, SafeArrayError>
fn try_convert(val: SCode) -> Result<Self, SafeArrayError>
Does not return any errors.
source§impl TryConvert<SCode, ElementError> for i32
impl TryConvert<SCode, ElementError> for i32
source§fn try_convert(val: SCode) -> Result<Self, ElementError>
fn try_convert(val: SCode) -> Result<Self, ElementError>
Does not return any errors.