pub struct Hdf5Dataset {
pub name: String,
pub dims: Vec<usize>,
pub dtype: H5Dtype,
pub chunk_size: Option<Vec<usize>>,
pub compression_level: u8,
pub attributes: HashMap<String, String>,
pub data: Vec<f64>,
}Expand description
Mock HDF5 dataset.
Fields§
§name: StringDataset name.
dims: Vec<usize>Dimensions.
dtype: H5DtypeData type.
chunk_size: Option<Vec<usize>>Chunk size (for chunked storage).
compression_level: u8Compression level (0 = none, 9 = max).
attributes: HashMap<String, String>Dataset attributes.
data: Vec<f64>Raw data storage (f64 for simplicity).
Implementations§
Source§impl Hdf5Dataset
impl Hdf5Dataset
Sourcepub fn set_chunk_size(&mut self, chunk: Vec<usize>)
pub fn set_chunk_size(&mut self, chunk: Vec<usize>)
Set chunk size.
Sourcepub fn set_compression(&mut self, level: u8)
pub fn set_compression(&mut self, level: u8)
Set compression level.
Sourcepub fn n_elements(&self) -> usize
pub fn n_elements(&self) -> usize
Total number of elements.
Sourcepub fn memory_bytes(&self) -> usize
pub fn memory_bytes(&self) -> usize
Estimated memory footprint (bytes).
Sourcepub fn write_slice(&mut self, offset: usize, values: &[f64])
pub fn write_slice(&mut self, offset: usize, values: &[f64])
Write data slice.
Trait Implementations§
Source§impl Clone for Hdf5Dataset
impl Clone for Hdf5Dataset
Source§fn clone(&self) -> Hdf5Dataset
fn clone(&self) -> Hdf5Dataset
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Hdf5Dataset
impl RefUnwindSafe for Hdf5Dataset
impl Send for Hdf5Dataset
impl Sync for Hdf5Dataset
impl Unpin for Hdf5Dataset
impl UnsafeUnpin for Hdf5Dataset
impl UnwindSafe for Hdf5Dataset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.