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 detector_dataset_paths(&self) -> Vec<String>
pub fn detector_dataset_paths(&self) -> Vec<String>
Enumerate every detector-source dataset’s full path (leading slash), in
document order. C NDFileHDF5 holds one NDFileHDF5Dataset per
<dataset source="detector"> node in detDataMap, each created by
createDatasetDetector (NDFileHDF5.cpp:1324-1357) and keyed by
get_full_name() — the same leading-slash full path produced here. The
writer creates all of them up front and routes each frame to one of
them by the detector_data_destination NDAttribute.
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 ndattribute_dataset(&self, name: &str) -> Option<(String, String)>
pub fn ndattribute_dataset(&self, name: &str) -> Option<(String, String)>
Find the layout <dataset source="ndattribute" ndattribute="name">
declared for the NDAttribute name, returning (parent group full path, dataset name). C find_dset_ndattr (NDFileHDF5.cpp:2792) routes a
matching NDAttribute into its XML-declared dataset/group instead of the
default attribute group.
Sourcepub fn ndattribute_element_attrs(&self) -> Vec<NdAttrElementAttr>
pub fn ndattribute_element_attrs(&self) -> Vec<NdAttrElementAttr>
Enumerate every <attribute source="ndattribute"> declared on a group
or dataset in the tree, in document order, with the owning element’s
full path. C storeOnOpenCloseAttribute (NDFileHDF5.cpp:553-632) writes
each as an HDF5 attribute on its element, sourcing the value from the
live NDAttribute (get_attributes() over groups and datasets).
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
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
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>
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>
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