pub struct Hdf5File { /* private fields */ }Expand description
An opened HDF5 file.
This is the main entry point for reading HDF5 files. The file data is memory-mapped for efficient access.
Implementations§
Source§impl Hdf5File
impl Hdf5File
Sourcepub fn open_with_options(
path: impl AsRef<Path>,
options: OpenOptions,
) -> Result<Self>
pub fn open_with_options( path: impl AsRef<Path>, options: OpenOptions, ) -> Result<Self>
Open an HDF5 file with custom options.
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self>
pub fn from_bytes(data: &[u8]) -> Result<Self>
Open an HDF5 file from an in-memory byte slice.
The data is copied into an owned buffer.
Sourcepub fn from_vec(data: Vec<u8>) -> Result<Self>
pub fn from_vec(data: Vec<u8>) -> Result<Self>
Open an HDF5 file from an owned byte vector without copying.
Sourcepub fn superblock(&self) -> &Superblock
pub fn superblock(&self) -> &Superblock
Get the parsed superblock.
Sourcepub fn get_or_parse_header(&self, addr: u64) -> Result<Arc<ObjectHeader>>
pub fn get_or_parse_header(&self, addr: u64) -> Result<Arc<ObjectHeader>>
Look up or parse an object header at the given address.
Uses the internal cache to avoid re-parsing the same header.
Sourcepub fn root_group(&self) -> Result<Group<'_>>
pub fn root_group(&self) -> Result<Group<'_>>
Get the root group of the file.
Auto Trait Implementations§
impl Freeze for Hdf5File
impl !RefUnwindSafe for Hdf5File
impl Send for Hdf5File
impl Sync for Hdf5File
impl Unpin for Hdf5File
impl UnsafeUnpin for Hdf5File
impl !UnwindSafe for Hdf5File
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