Enum binpool::Type
[−]
[src]
pub enum Type { U8, U16, U32, U64, I8, I16, I32, I64, F32, F64, }
Type format for a property.
Variants
U8
Unsigned 8 bit integer.
U16
Unsigned 16 bit integer.
U32
Unsigned 32 bit integer.
U64
Unsigned 64 bit integer.
I8
Signed 8 bit integer.
I16
Signed 16 bit integer.
I32
Signed 32 bit integer.
I64
Signed 64 bit integer.
F32
32 bit float.
F64
64 bit float.
Methods
impl Type
[src]
fn type_id(&self) -> u16
A unique number representing each type.
fn type_size(&self) -> u64
Returns the size of type in bytes.
fn matrix(&self, rows: u8, cols: u8) -> Option<(u16, u64)>
Returns the type format and size in bytes for a matrix.
Notice that this method uses rows and columns, not width and height.
Returns None
if the matrix exceed dimensions 80x80.
Returns None
if the width or height is zero.
fn scalar(&self) -> (u16, u64)
Returns the type format and size in bytes for a scalar.
fn vector(&self, dim: u8) -> Option<(u16, u64)>
Returns the type format and size in bytes for a vector.
Returns None
if the vector exceed dimension 80.
Returns None
if the vector has dimension zero.
fn offset_custom_format() -> u16
Returns the offset for specifying a custom format.
fn custom_formats() -> u16
Returns the number of available custom formats.
fn info(format: u16) -> Option<(Type, u8, u8)>
Returns the type and matrix dimensions from type format.
Trait Implementations
impl Copy for Type
[src]
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, other: &Rhs) -> bool
1.0.0
This method tests for !=
.