pub trait NodeMetadata:
Sized
+ Copy
+ Default {
// Required method
fn merge(self, other: Self) -> Self;
// Provided methods
fn with_size(self, _size: u16) -> Self { ... }
fn with_declaration(self) -> Self { ... }
fn with_nested(self) -> Self { ... }
}Expand description
Aggregated metadata for nodes, that can propagate up a node tree.
Required Methods§
Provided Methods§
Sourcefn with_size(self, _size: u16) -> Self
fn with_size(self, _size: u16) -> Self
Sets the size of this metadata (e.g., number of declarations, selector list length). Default implementation is a no-op for metadata types that don’t track size.
Sourcefn with_declaration(self) -> Self
fn with_declaration(self) -> Self
Marks this metadata as describing a declaration. Default implementation is a no-op for metadata types that don’t track node kinds.
Sourcefn with_nested(self) -> Self
fn with_nested(self) -> Self
Marks this metadata as describing a node nested inside another node. Default implementation is a no-op for metadata types that don’t track node kinds.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".