Enum windows_metadata::reader::Type
source · pub enum Type {
Show 34 variants
Void,
Bool,
Char,
I8,
U8,
I16,
U16,
I32,
U32,
I64,
U64,
F32,
F64,
ISize,
USize,
String,
GUID,
IUnknown,
IInspectable,
HRESULT,
PSTR,
PWSTR,
PCSTR,
PCWSTR,
BSTR,
TypeName,
GenericParam(GenericParam),
TypeDef((TypeDef, Vec<Self>)),
MutPtr((Box<Self>, usize)),
ConstPtr((Box<Self>, usize)),
Win32Array((Box<Self>, usize)),
WinrtArray(Box<Self>),
WinrtArrayRef(Box<Self>),
WinrtConstRef(Box<Self>),
}
Variants§
Void
Bool
Char
I8
U8
I16
U16
I32
U32
I64
U64
F32
F64
ISize
USize
String
GUID
IUnknown
IInspectable
HRESULT
PSTR
PWSTR
PCSTR
PCWSTR
BSTR
TypeName
GenericParam(GenericParam)
TypeDef((TypeDef, Vec<Self>))
MutPtr((Box<Self>, usize))
ConstPtr((Box<Self>, usize))
Win32Array((Box<Self>, usize))
WinrtArray(Box<Self>)
WinrtArrayRef(Box<Self>)
WinrtConstRef(Box<Self>)
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.
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_winrt_const_ref(&self) -> bool
pub fn is_winrt_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