Enum windows_metadata::Type
source · pub enum Type {
Show 36 variants
Void,
Bool,
Char,
I8,
U8,
I16,
U16,
I32,
U32,
I64,
U64,
F32,
F64,
ISize,
USize,
GUID,
String,
IInspectable,
TypeName,
TypeRef(TypeDefOrRef),
GenericParam(GenericParam),
TypeDef(TypeDef, Vec<Self>),
MutPtr(Box<Self>, usize),
ConstPtr(Box<Self>, usize),
Win32Array(Box<Self>, usize),
WinrtArray(Box<Self>),
WinrtArrayRef(Box<Self>),
ConstRef(Box<Self>),
PrimitiveOrEnum(Box<Self>, Box<Self>),
HRESULT,
IUnknown,
PSTR,
PWSTR,
PCSTR,
PCWSTR,
BSTR,
}Variants§
Void
Bool
Char
I8
U8
I16
U16
I32
U32
I64
U64
F32
F64
ISize
USize
GUID
String
IInspectable
TypeName
TypeRef(TypeDefOrRef)
GenericParam(GenericParam)
TypeDef(TypeDef, Vec<Self>)
MutPtr(Box<Self>, usize)
ConstPtr(Box<Self>, usize)
Win32Array(Box<Self>, usize)
WinrtArray(Box<Self>)
WinrtArrayRef(Box<Self>)
ConstRef(Box<Self>)
PrimitiveOrEnum(Box<Self>, Box<Self>)
HRESULT
IUnknown
PSTR
PWSTR
PCSTR
PCWSTR
BSTR
Implementations§
source§impl Type
impl Type
sourcepub fn from_code(code: usize) -> Option<Self>
pub fn from_code(code: usize) -> Option<Self>
Creates a Type object from an ELEMENT_TYPE (see ECMA-335) type constant, typically
used to indicate the type of a constant or primitive type signature.
sourcepub fn to_const_type(self) -> Self
pub fn to_const_type(self) -> Self
Converts the Type to an equivalent const variant if appropriate.
pub fn to_underlying_type(&self) -> Self
sourcepub fn to_const_ptr(self) -> Self
pub fn to_const_ptr(self) -> Self
Converts a mutable pointer type, if appropriate, to a const pointer type.
sourcepub fn deref(&self) -> Self
pub fn deref(&self) -> Self
Removes one level of indirection, typically used when transforming a logical return or array parameter from its underlying type signature.
sourcepub fn is_winrt_array(&self) -> bool
pub fn is_winrt_array(&self) -> bool
Returns true if the Type represents a WinRT array.
sourcepub fn is_winrt_array_ref(&self) -> bool
pub fn is_winrt_array_ref(&self) -> bool
Returns true if the Type represents a mutable WinRT array reference.
sourcepub fn is_const_ref(&self) -> bool
pub fn is_const_ref(&self) -> bool
Returns true if the Type represents an immutable WinRT array reference.
sourcepub fn is_generic(&self) -> bool
pub fn is_generic(&self) -> bool
Returns true if the Type is a generic parameter.
sourcepub fn is_pointer(&self) -> bool
pub fn is_pointer(&self) -> bool
Returns true if the Type is a pointer.
sourcepub fn is_unsigned(&self) -> bool
pub fn is_unsigned(&self) -> bool
Returns true if the Type is unsigned.
sourcepub fn is_byte_size(&self) -> bool
pub fn is_byte_size(&self) -> bool
Returns true if the Type has a byte-sized address.
Trait Implementations§
source§impl Ord for Type
impl Ord for Type
source§impl PartialEq<Type> for Type
impl PartialEq<Type> for Type
source§impl PartialOrd<Type> for Type
impl PartialOrd<Type> for Type
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more