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
sourceimpl 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(self) -> Self
pub fn to_const(self) -> Self
Converts the Type
to an equivalent const
variant if appropriate, typically used when the
mutability is informed by something outside of the type signature.
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
sourceimpl Ord for Type
impl Ord for Type
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialOrd<Type> for Type
impl PartialOrd<Type> for Type
sourcefn partial_cmp(&self, other: &Type) -> Option<Ordering>
fn partial_cmp(&self, other: &Type) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more