pub trait CustomNode:
Debug
+ Send
+ Sync {
// Required methods
fn write(&self, writer: &mut dyn CustomNodeWriter) -> WriteResult<()>;
fn clone_box(&self) -> Box<dyn CustomNode>;
fn eq_box(&self, other: &dyn CustomNode) -> bool;
fn is_block(&self) -> bool;
fn as_any(&self) -> &dyn Any;
}Expand description
Trait for implementing custom node behavior
Required Methods§
Sourcefn write(&self, writer: &mut dyn CustomNodeWriter) -> WriteResult<()>
fn write(&self, writer: &mut dyn CustomNodeWriter) -> WriteResult<()>
Write the custom node content to the provided writer
Sourcefn clone_box(&self) -> Box<dyn CustomNode>
fn clone_box(&self) -> Box<dyn CustomNode>
Clone the custom node
Sourcefn eq_box(&self, other: &dyn CustomNode) -> bool
fn eq_box(&self, other: &dyn CustomNode) -> bool
Check if two custom nodes are equal