pub trait StructuredNode<'a>: Sized {
// Required methods
fn kind(&self) -> Cow<'a, str>;
fn attribute(&self, key: &str) -> Option<StructuredValue<'a>>;
fn children(&self) -> Vec<Self>;
fn value(&self) -> StructuredValue<'a>;
// Provided methods
fn identifier(&self) -> Option<Cow<'a, str>> { ... }
fn attribute_str(&self, key: &str) -> Option<Cow<'a, str>> { ... }
fn attribute_bool(&self, key: &str) -> Option<bool> { ... }
fn type_annotation(&self) -> Option<Cow<'a, str>> { ... }
}Required Methods§
fn kind(&self) -> Cow<'a, str>
fn attribute(&self, key: &str) -> Option<StructuredValue<'a>>
fn children(&self) -> Vec<Self>
fn value(&self) -> StructuredValue<'a>
Provided Methods§
fn identifier(&self) -> Option<Cow<'a, str>>
fn attribute_str(&self, key: &str) -> Option<Cow<'a, str>>
fn attribute_bool(&self, key: &str) -> Option<bool>
fn type_annotation(&self) -> Option<Cow<'a, str>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.