pub struct ElementTree { /* private fields */ }Expand description
Stack-based element tree builder. Begin/end pairs must balance; pushing
a child on End makes the tree append-only from the consumer’s view.
Implementations§
Source§impl ElementTree
impl ElementTree
pub fn new() -> Self
pub fn element_begin(&mut self, name: impl Into<String>)
pub fn element_end(&mut self)
pub fn element_name(&mut self, name: impl Into<String>)
pub fn element_info(&mut self, value: impl Into<String>, measure: Option<&str>)
Sourcepub fn param(&mut self, name: impl Into<String>, value: impl Into<String>)
pub fn param(&mut self, name: impl Into<String>, value: impl Into<String>)
Record a field read (called by Get_B* / Get_L* / etc).
pub fn element_level(&self) -> usize
pub fn set_current_size(&mut self, size: u64)
Sourcepub fn root(&self) -> &ElementNode
pub fn root(&self) -> &ElementNode
Returns the root node. Only meaningful when all Begin/End pairs have
balanced (i.e. Element_Level() == 0).
Sourcepub fn current_mut(&mut self) -> &mut ElementNode
pub fn current_mut(&mut self) -> &mut ElementNode
Mutable access to the current (top-of-stack) element. Used by
FileAnalyze::Get_B* etc. to record param entries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ElementTree
impl RefUnwindSafe for ElementTree
impl Send for ElementTree
impl Sync for ElementTree
impl Unpin for ElementTree
impl UnsafeUnpin for ElementTree
impl UnwindSafe for ElementTree
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