pub struct Hdf5Layout {
pub groups: Vec<LayoutGroup>,
pub detector_data_destination: Option<String>,
}Expand description
The parsed HDF5 layout tree (<hdf5_layout> root).
Fields§
§groups: Vec<LayoutGroup>Top-level groups.
detector_data_destination: Option<String><global name="detector_data_destination" ndattribute="..."/>.
Implementations§
Source§impl Hdf5Layout
impl Hdf5Layout
Sourcepub fn from_file(path: &Path) -> Result<Hdf5Layout, LayoutError>
pub fn from_file(path: &Path) -> Result<Hdf5Layout, LayoutError>
Parse a layout XML file from disk.
Sourcepub fn parse(text: &str) -> Result<Hdf5Layout, LayoutError>
pub fn parse(text: &str) -> Result<Hdf5Layout, LayoutError>
Parse a layout XML document from a string.
Sourcepub fn for_each_dataset<F: FnMut(&str, &LayoutDataset)>(&self, f: F)
pub fn for_each_dataset<F: FnMut(&str, &LayoutDataset)>(&self, f: F)
Walk every dataset in the tree, yielding (full_group_path, dataset).
Sourcepub fn detector_dataset_path(&self) -> Option<String>
pub fn detector_dataset_path(&self) -> Option<String>
Find the dataset flagged det_default, returning its full path.
Sourcepub fn dataset_group_path(&self, name: &str) -> Option<String>
pub fn dataset_group_path(&self, name: &str) -> Option<String>
Find the group path of the first dataset named name, returning the
owning group’s full path (the C NDFileHDF5 performance dataset is a
<dataset name="timestamp"> in the layout tree).
Sourcepub fn ndattr_default_group(&self) -> Option<String>
pub fn ndattr_default_group(&self) -> Option<String>
Find the group flagged ndattr_default, returning its full path.
Trait Implementations§
Source§impl Clone for Hdf5Layout
impl Clone for Hdf5Layout
Source§fn clone(&self) -> Hdf5Layout
fn clone(&self) -> Hdf5Layout
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 moreSource§impl Debug for Hdf5Layout
impl Debug for Hdf5Layout
Source§impl Default for Hdf5Layout
impl Default for Hdf5Layout
Source§fn default() -> Hdf5Layout
fn default() -> Hdf5Layout
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Hdf5Layout
impl RefUnwindSafe for Hdf5Layout
impl Send for Hdf5Layout
impl Sync for Hdf5Layout
impl Unpin for Hdf5Layout
impl UnsafeUnpin for Hdf5Layout
impl UnwindSafe for Hdf5Layout
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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