pub struct Dataset<'f> { /* private fields */ }Expand description
A dataset within an HDF5 file.
Implementations§
Source§impl<'f> Dataset<'f>
impl<'f> Dataset<'f>
Sourcepub fn address(&self) -> u64
pub fn address(&self) -> u64
The object header address used to parse this dataset. Useful as an opaque identifier or for NC4 data_offset.
Sourcepub fn max_dims(&self) -> Option<&[u64]>
pub fn max_dims(&self) -> Option<&[u64]>
Maximum dimension sizes, if defined. u64::MAX indicates unlimited.
Sourcepub fn fill_value(&self) -> Option<&FillValueMessage>
pub fn fill_value(&self) -> Option<&FillValueMessage>
Fill value, if defined.
Sourcepub fn attributes(&self) -> Vec<Attribute>
pub fn attributes(&self) -> Vec<Attribute>
Dataset attributes.
Sourcepub fn read_string(&self) -> Result<String>
pub fn read_string(&self) -> Result<String>
Read a scalar string dataset or single string element.
Use Dataset::read_strings when the dataset contains multiple strings.
Sourcepub fn read_strings(&self) -> Result<Vec<String>>
pub fn read_strings(&self) -> Result<Vec<String>>
Read all string elements from a string-typed dataset.
Sourcepub fn num_elements(&self) -> u64
pub fn num_elements(&self) -> u64
Total number of elements in the dataset.
Sourcepub fn read_array<T: H5Type>(&self) -> Result<ArrayD<T>>
pub fn read_array<T: H5Type>(&self) -> Result<ArrayD<T>>
Read the entire dataset into an n-dimensional array.
Sourcepub fn read_array_parallel<T: H5Type>(&self) -> Result<ArrayD<T>>
pub fn read_array_parallel<T: H5Type>(&self) -> Result<ArrayD<T>>
Read the entire dataset using internal chunk-level parallelism when possible.
Non-chunked datasets fall back to read_array.
Sourcepub fn read_array_in_pool<T: H5Type>(
&self,
pool: &ThreadPool,
) -> Result<ArrayD<T>>
pub fn read_array_in_pool<T: H5Type>( &self, pool: &ThreadPool, ) -> Result<ArrayD<T>>
Read the entire dataset using the provided Rayon thread pool.
Non-chunked datasets fall back to read_array.
Auto Trait Implementations§
impl<'f> Freeze for Dataset<'f>
impl<'f> !RefUnwindSafe for Dataset<'f>
impl<'f> Send for Dataset<'f>
impl<'f> Sync for Dataset<'f>
impl<'f> Unpin for Dataset<'f>
impl<'f> UnsafeUnpin for Dataset<'f>
impl<'f> !UnwindSafe for Dataset<'f>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more