[][src]Macro debug_tree::add_leaf_to

macro_rules! add_leaf_to {
    ($state:expr, $($arg:tt)*) => { ... };
}

Adds a leaf to given tree with the given text and formatting arguments

Arguments

  • tree - The tree that the leaf should be added to
  • text... - Formatted text arguments, as per format!(...).

Example

#[macro_use]
use debug_tree::{TreeBuilder, add_leaf_to};
fn main() {
    let tree = TreeBuilder::new();
    add_leaf_to!(tree, "A {} leaf", "new");
    assert_eq!("A new leaf", &tree.peek_string());
}