|
use std::fmt::Display;
|
|
#[derive(Debug)]
|
|
pub struct Node<'a> {
|
|
pub text: Option<&'a str>,
|
|
pub children: Vec<Node<'a>>,
|
|
}
|
|
|
|
impl Display for Node<'_> {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
write!(f, "{:#?}", self)?;
|
|
|
|
Ok(())
|
|
}
|
|
}
|