pub struct Tree { /* private fields */ }Expand description
A parsed ASDF tree.
Implementations§
Source§impl Tree
impl Tree
Sourcepub fn get(&self, path: &str) -> Option<Value<'_>>
pub fn get(&self, path: &str) -> Option<Value<'_>>
The value at a path, using ASDF’s YAML Pointer syntax.
A numeric component indexes a sequence or names a mapping key depending on what its parent is; negative indices count from the end.
Sourcepub fn read_array(&self, array: &Ndarray) -> Result<Vec<Element>>
pub fn read_array(&self, array: &Ndarray) -> Result<Vec<Element>>
Read every element of an array whose data is inline in this tree.
Inline data needs no file: the values are already here. An array
backed by a block is read through AsdfFile::read_array instead,
and is an error here.
Sourcepub fn meta(&self) -> Result<Meta>
pub fn meta(&self) -> Result<Meta>
What this file says about itself: what wrote it, and its history.
Everything in it is optional, so a file that says nothing yields an
empty Meta rather than an error.
Sourcepub fn document(&self) -> &Document
pub fn document(&self) -> &Document
The underlying document, for callers needing the lower-level model.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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