pub struct BalanceTree<'ctx> { /* private fields */ }Expand description
Accumulated balance, considering the account hierarchy.
Implementations§
Source§impl<'ctx> BalanceTree<'ctx>
impl<'ctx> BalanceTree<'ctx>
pub fn create( ctx: &ReportContext<'ctx>, balance: Balance<'ctx>, ) -> Result<Self, QueryError>
Sourcepub fn nodes(&self) -> &[BalanceTreeNode<'ctx>]
pub fn nodes(&self) -> &[BalanceTreeNode<'ctx>]
Returns all nodes in the flat vector.
The order is both alphabetical (by account name) and a pre-order
(DFS) flattening of the account hierarchy; index 0 is always the
synthetic AccountTreeKey::Root.
Sourcepub fn into_nodes(self) -> Vec<BalanceTreeNode<'ctx>>
pub fn into_nodes(self) -> Vec<BalanceTreeNode<'ctx>>
Consumes the tree and returns the owned node vector.
See Self::nodes for the ordering guarantees.
Trait Implementations§
Auto Trait Implementations§
impl<'ctx> Freeze for BalanceTree<'ctx>
impl<'ctx> RefUnwindSafe for BalanceTree<'ctx>
impl<'ctx> Send for BalanceTree<'ctx>
impl<'ctx> Sync for BalanceTree<'ctx>
impl<'ctx> Unpin for BalanceTree<'ctx>
impl<'ctx> UnsafeUnpin for BalanceTree<'ctx>
impl<'ctx> UnwindSafe for BalanceTree<'ctx>
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