Enum typeinfo::Type
[−]
[src]
pub enum Type { Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64, Char, Bool, Array(Box<Type>, usize), Compound(Vec<Field>, usize), }
Represents a POD type: scalar, fixed-size array or compound (struct). May be arbitrarily nested.
Variants
Int8
1-byte signed integer
Int16
2-byte signed integer
Int32
4-byte signed integer
Int64
8-byte signed integer
UInt8
1-byte unsigned integer
UInt16
2-byte unsigned integer
UInt32
3-byte unsigned integer
UInt64
4-byte unsigned integer
Float32
4-byte floating-point number
Float64
8-byte floating-point number
Char
4-byte unicode character type
Bool
1-byte boolean type
Array(Box<Type>, usize)
fixed-size array with POD elements
Compound(Vec<Field>, usize)
compound type whose fields are POD
Methods
impl Type
[src]
fn size(&self) -> usize
Returns the total size of a type value in bytes.
fn is_scalar(&self) -> bool
Returns true if the underlying type is a scalar.
fn is_array(&self) -> bool
Returns true if the underlying type is a fixed-size array.
fn is_compound(&self) -> bool
Returns true if the underlying type is compound.
Trait Implementations
impl Clone for Type
[src]
fn clone(&self) -> Type
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Type
[src]
fn eq(&self, __arg_0: &Type) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Type) -> bool
This method tests for !=
.