pub enum Reference {
Null,
Object {
address: u64,
file: Option<String>,
path: Option<String>,
},
Region {
address: u64,
file: Option<String>,
path: Option<String>,
selection: Selection,
},
Attr {
address: u64,
file: Option<String>,
path: Option<String>,
name: String,
},
}Expand description
One reference element, decoded and resolved against the file it came from.
path is the target’s absolute path when the file’s link structure names
it, and None when nothing in the traversed structure points at that
address — a reference into an untraversed part of the file, or a stale one
left by a deletion. The address is reported either way.
Variants§
Null
An element naming no object: the undefined address libhdf5 writes for an unset object reference, or a zeroed region-reference heap id.
Object
A whole object — H5R_OBJECT1 or H5R_OBJECT2.
Fields
file: Option<String>The file the target lives in; see Reference::file.
Region
A dataset plus a selection over it — H5R_DATASET_REGION1 or
H5R_DATASET_REGION2.
Fields
file: Option<String>The file the target dataset lives in; see Reference::file.
Attr
H5R_ATTR: one attribute of an object, by name. Only the 1.12
encodings can express it.
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn file(&self) -> Option<&str>
pub fn file(&self) -> Option<&str>
The file the target lives in, for a reference that names another file
— H5Rget_file_name on an un-opened external reference. None means
the file holding the reference, which is every reference libhdf5 can
write without the H5R_IS_EXTERNAL flag.
The name is the one the target file was open under when the reference
was written, recorded verbatim, and path is a path
inside that file.
Sourcepub fn address(&self) -> Option<u64>
pub fn address(&self) -> Option<u64>
The target’s object header address, or None for a null reference.
Sourcepub fn attribute_name(&self) -> Option<&str>
pub fn attribute_name(&self) -> Option<&str>
The attribute an attribute reference names; None for the other kinds.
Sourcepub fn selection(&self) -> Option<&Selection>
pub fn selection(&self) -> Option<&Selection>
The selection a region reference carries; None for the other kinds.