Enum windows_metadata::reader::Type
source · [−]pub enum Type {
Show 33 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,
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
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.
Trait Implementations
sourceimpl Ord for Type
impl Ord for Type
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Type
impl StructuralEq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more