pub struct DataInfo {
pub name: String,
pub attribute: DataAttribute,
pub number_type: NumberType,
pub precision: u8,
pub components: usize,
pub len: usize,
}Expand description
Metadata about one field found at a time step, sized so the caller can allocate a buffer before reading the data.
Fields§
§name: StringName of the field
attribute: DataAttributeThe field’s shape. Tensor6, Matrix(n, m) and Generic all write as Matrix, and the
file does not say which, so those come back as DataAttribute::Generic with the real
component count.
number_type: NumberTypeThe element type the file holds this field as.
precision: u8The element width, in bytes, the file holds this field at.
components: usizeComponents per entity, the product of the dimensions past the first. What len
was sized with, so trust it over attribute’s own count.
len: usizeTotal element count: num_entities * components.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataInfo
impl RefUnwindSafe for DataInfo
impl Send for DataInfo
impl Sync for DataInfo
impl Unpin for DataInfo
impl UnsafeUnpin for DataInfo
impl UnwindSafe for DataInfo
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