Enum rubbl_casatables::GlueDataType
source · #[repr(u32)]
pub enum GlueDataType {
Show 31 variants
TpBool,
TpChar,
TpUChar,
TpShort,
TpUShort,
TpInt,
TpUInt,
TpFloat,
TpDouble,
TpComplex,
TpDComplex,
TpString,
TpTable,
TpArrayBool,
TpArrayChar,
TpArrayUChar,
TpArrayShort,
TpArrayUShort,
TpArrayInt,
TpArrayUInt,
TpArrayFloat,
TpArrayDouble,
TpArrayComplex,
TpArrayDComplex,
TpArrayString,
TpRecord,
TpOther,
TpQuantity,
TpArrayQuantity,
TpInt64,
TpArrayInt64,
}
Expand description
Different data types supported by the CASA tables format.
Variants§
TpBool
A boolean value.
TpChar
A signed 8-bit integer value.
TpUChar
An unsigned 8-bit integer value.
TpShort
A signed 16-bit integer value.
TpUShort
An unsigned 16-bit integer value.
TpInt
A signed 32-bit integer value.
TpUInt
An unsigned 32-bit integer value.
TpFloat
A 32-bit IEEE754 floating-point value.
TpDouble
A 64-bit IEEE754 double-precision floating-point value.
TpComplex
A complex number composed of two single-precision floating-point values.
TpDComplex
A complex number composed of two double-precision floating-point values.
TpString
A string value. Todo: encoding???
TpTable
A value that is its own CASA table.
TpArrayBool
A value that is an array of booleans.
TpArrayChar
A value that is an array of signed 8-bit integers.
TpArrayUChar
A value that is an array of unsigned 8-bit integers.
TpArrayShort
A value that is an array of signed 16-bit integers.
TpArrayUShort
A value that is an array of unsigned 16-bit integers.
TpArrayInt
A value that is an array of signed 32-bit integers.
TpArrayUInt
A value that is an array of unsigned 32-bit integers.
TpArrayFloat
A value that is an array of 32-bit single-precision floating-point numbers.
TpArrayDouble
A value that is an array of 64-bit double-precision floating-point numbers.
TpArrayComplex
A value that is an array of complex numbers with single-precision components.
TpArrayDComplex
A value that is an array of complex numbers with double-precision components.
TpArrayString
A value that is an array of strings. Todo: encoding???
TpRecord
A value that is a dictionary of name-value pairs.
TpOther
A value of some other type.
TpQuantity
A value that is a physical quantity with associated dimensions.
TpArrayQuantity
A value that is an array of physical quantities with associated dimensions.
TpInt64
A signed 64-bit integer value.
TpArrayInt64
A value that is an array of unsigned 8-bit integers.
Implementations§
source§impl GlueDataType
impl GlueDataType
sourcepub fn element_size(&self) -> i32
pub fn element_size(&self) -> i32
Return the number of bytes per element of this data type.
Returns -1 for types that do not have fixed sizes, which includes
strings. TpX
and TpArrayX
both return the same value.
Trait Implementations§
source§impl Clone for GlueDataType
impl Clone for GlueDataType
source§fn clone(&self) -> GlueDataType
fn clone(&self) -> GlueDataType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GlueDataType
impl Debug for GlueDataType
source§impl Display for GlueDataType
impl Display for GlueDataType
source§impl Hash for GlueDataType
impl Hash for GlueDataType
source§impl PartialEq<GlueDataType> for GlueDataType
impl PartialEq<GlueDataType> for GlueDataType
source§fn eq(&self, other: &GlueDataType) -> bool
fn eq(&self, other: &GlueDataType) -> bool
self
and other
values to be equal, and is used
by ==
.