Enum Variant

Source
pub enum Variant {
Show 37 variants Empty, Null, Bool(bool), BoolRef(&'static mut ComBool), I8(i8), I8Ref(PSTR), I16(i16), I16Ref(&'static mut i16), I32(i32), I32Ref(&'static mut i32), I64(i64), I64Ref(&'static mut i64), U8(u8), U8Ref(&'static mut u8), U16(u16), U16Ref(&'static mut u16), U32(u32), U32Ref(&'static mut u32), U64(u64), U64Ref(&'static mut u64), F32(f32), F32Ref(&'static mut f32), F64(f64), F64Ref(&'static mut f64), Currency(Currency), CurrencyRef(&'static mut ComCurrency), Decimal(Decimal), DecimalRef(&'static mut ComDecimal), Date(NaiveDateTime), DateRef(&'static mut ComDate), String(BSTR), StringRef(&'static mut BSTR), Dispatch(Option<IDispatch>), Unknown(Option<IUnknown>), Error(HRESULT), ErrorRef(&'static mut HRESULT), VariantRef(PtrWrapper<VARIANT>),
}

Variants§

§

Empty

§

Null

§

Bool(bool)

§

BoolRef(&'static mut ComBool)

§

I8(i8)

§

I8Ref(PSTR)

§

I16(i16)

§

I16Ref(&'static mut i16)

§

I32(i32)

§

I32Ref(&'static mut i32)

§

I64(i64)

§

I64Ref(&'static mut i64)

§

U8(u8)

§

U8Ref(&'static mut u8)

§

U16(u16)

§

U16Ref(&'static mut u16)

§

U32(u32)

§

U32Ref(&'static mut u32)

§

U64(u64)

§

U64Ref(&'static mut u64)

§

F32(f32)

§

F32Ref(&'static mut f32)

§

F64(f64)

§

F64Ref(&'static mut f64)

§

Currency(Currency)

§

CurrencyRef(&'static mut ComCurrency)

§

Decimal(Decimal)

§

DecimalRef(&'static mut ComDecimal)

§

Date(NaiveDateTime)

§

DateRef(&'static mut ComDate)

§

String(BSTR)

§

StringRef(&'static mut BSTR)

§

Dispatch(Option<IDispatch>)

§

Unknown(Option<IUnknown>)

§

Error(HRESULT)

§

ErrorRef(&'static mut HRESULT)

§

VariantRef(PtrWrapper<VARIANT>)

Implementations§

Source§

impl Variant

Source

pub fn try_empty(self) -> Result<(), Variant>

Source

pub fn expect_empty(self)

Source

pub fn try_null(self) -> Result<(), Variant>

Source

pub fn expect_null(self)

Source

pub fn try_bool(self) -> Result<bool, Variant>

Source

pub fn expect_bool(self) -> bool

Source

pub fn try_boolref(self) -> Result<&'static mut ComBool, Variant>

Source

pub fn expect_boolref(self) -> &'static mut ComBool

Source

pub fn try_i8(self) -> Result<i8, Variant>

Source

pub fn expect_i8(self) -> i8

Source

pub fn try_i8ref(self) -> Result<PSTR, Variant>

Source

pub fn expect_i8ref(self) -> PSTR

Source

pub fn try_i16(self) -> Result<i16, Variant>

Source

pub fn expect_i16(self) -> i16

Source

pub fn try_i16ref(self) -> Result<&'static mut i16, Variant>

Source

pub fn expect_i16ref(self) -> &'static mut i16

Source

pub fn try_i32(self) -> Result<i32, Variant>

Source

pub fn expect_i32(self) -> i32

Source

pub fn try_i32ref(self) -> Result<&'static mut i32, Variant>

Source

pub fn expect_i32ref(self) -> &'static mut i32

Source

pub fn try_i64(self) -> Result<i64, Variant>

Source

pub fn expect_i64(self) -> i64

Source

pub fn try_i64ref(self) -> Result<&'static mut i64, Variant>

Source

pub fn expect_i64ref(self) -> &'static mut i64

Source

pub fn try_u8(self) -> Result<u8, Variant>

Source

pub fn expect_u8(self) -> u8

Source

pub fn try_u8ref(self) -> Result<&'static mut u8, Variant>

Source

pub fn expect_u8ref(self) -> &'static mut u8

Source

pub fn try_u16(self) -> Result<u16, Variant>

Source

pub fn expect_u16(self) -> u16

Source

pub fn try_u16ref(self) -> Result<&'static mut u16, Variant>

Source

pub fn expect_u16ref(self) -> &'static mut u16

Source

pub fn try_u32(self) -> Result<u32, Variant>

Source

pub fn expect_u32(self) -> u32

Source

pub fn try_u32ref(self) -> Result<&'static mut u32, Variant>

Source

pub fn expect_u32ref(self) -> &'static mut u32

Source

pub fn try_u64(self) -> Result<u64, Variant>

Source

pub fn expect_u64(self) -> u64

Source

pub fn try_u64ref(self) -> Result<&'static mut u64, Variant>

Source

pub fn expect_u64ref(self) -> &'static mut u64

Source

pub fn try_f32(self) -> Result<f32, Variant>

Source

pub fn expect_f32(self) -> f32

Source

pub fn try_f32ref(self) -> Result<&'static mut f32, Variant>

Source

pub fn expect_f32ref(self) -> &'static mut f32

Source

pub fn try_f64(self) -> Result<f64, Variant>

Source

pub fn expect_f64(self) -> f64

Source

pub fn try_f64ref(self) -> Result<&'static mut f64, Variant>

Source

pub fn expect_f64ref(self) -> &'static mut f64

Source

pub fn try_currency(self) -> Result<Currency, Variant>

Source

pub fn expect_currency(self) -> Currency

Source

pub fn try_currencyref(self) -> Result<&'static mut ComCurrency, Variant>

Source

pub fn expect_currencyref(self) -> &'static mut ComCurrency

Source

pub fn try_decimal(self) -> Result<Decimal, Variant>

Source

pub fn expect_decimal(self) -> Decimal

Source

pub fn try_decimalref(self) -> Result<&'static mut ComDecimal, Variant>

Source

pub fn expect_decimalref(self) -> &'static mut ComDecimal

Source

pub fn try_date(self) -> Result<NaiveDateTime, Variant>

Source

pub fn expect_date(self) -> NaiveDateTime

Source

pub fn try_dateref(self) -> Result<&'static mut ComDate, Variant>

Source

pub fn expect_dateref(self) -> &'static mut ComDate

Source

pub fn try_string(self) -> Result<BSTR, Variant>

Source

pub fn expect_string(self) -> BSTR

Source

pub fn try_stringref(self) -> Result<&'static mut BSTR, Variant>

Source

pub fn expect_stringref(self) -> &'static mut BSTR

Source

pub fn try_dispatch(self) -> Result<Option<IDispatch>, Variant>

Source

pub fn expect_dispatch(self) -> Option<IDispatch>

Source

pub fn try_unknown(self) -> Result<Option<IUnknown>, Variant>

Source

pub fn expect_unknown(self) -> Option<IUnknown>

Source

pub fn try_error(self) -> Result<HRESULT, Variant>

Source

pub fn expect_error(self) -> HRESULT

Source

pub fn try_errorref(self) -> Result<&'static mut HRESULT, Variant>

Source

pub fn expect_errorref(self) -> &'static mut HRESULT

Source

pub fn try_variantref(self) -> Result<PtrWrapper<VARIANT>, Variant>

Source

pub fn expect_variantref(self) -> PtrWrapper<VARIANT>

Trait Implementations§

Source§

impl Clone for Variant

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Variant

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ToVariant> From<T> for Variant

Source§

fn from(t: T) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Variant

Source§

fn eq(&self, other: &Variant) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryInto<VARIANT> for Variant

Source§

type Error = VariantConversionError

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<VARIANT, VariantConversionError>

Performs the conversion.
Source§

impl TryInto<Variant> for VARIANT

Source§

type Error = VariantConversionError

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<Variant, VariantConversionError>

Performs the conversion.
Source§

impl StructuralPartialEq for Variant

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.