pub struct Datatype {
pub scalar: ScalarType,
pub size: u64,
pub byteorder: ByteOrder,
pub shape: Vec<u64>,
pub fields: Vec<Field>,
}Expand description
A complete datatype.
Fields§
§scalar: ScalarTypeThe scalar type, or ScalarType::Structured for a compound type.
size: u64Element size in bytes. Computed for numeric types; carried explicitly for strings, where it is the length in characters times the character width.
byteorder: ByteOrderByte order for this type’s elements, where it differs from the array’s.
shape: Vec<u64>Sub-array shape, for a field that is itself an array.
fields: Vec<Field>Fields, for a compound type.
Implementations§
Source§impl Datatype
impl Datatype
Sourcepub fn scalar(scalar: ScalarType) -> Datatype
pub fn scalar(scalar: ScalarType) -> Datatype
A plain scalar datatype.
Sourcepub fn string(scalar: ScalarType, length: u64) -> Datatype
pub fn string(scalar: ScalarType, length: u64) -> Datatype
A fixed-length string datatype, sized in characters.
Sourcepub fn is_structured(&self) -> bool
pub fn is_structured(&self) -> bool
Whether this is a compound type.
Trait Implementations§
impl StructuralPartialEq for Datatype
Auto Trait Implementations§
impl Freeze for Datatype
impl RefUnwindSafe for Datatype
impl Send for Datatype
impl Sync for Datatype
impl Unpin for Datatype
impl UnsafeUnpin for Datatype
impl UnwindSafe for Datatype
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more