pub trait CustomNodeFactory {
// Required methods
fn tags(&self) -> &'static [&'static str];
fn create(
&self,
tag: &str,
ctx: &CustomNodeContext<'_>,
) -> Option<Arc<dyn CustomNode>>;
}Expand description
Constructs a CustomNode for a given HTML tag.
Required Methods§
The tags this factory can construct (drives CUSTOM_TAGS).
Sourcefn create(
&self,
tag: &str,
ctx: &CustomNodeContext<'_>,
) -> Option<Arc<dyn CustomNode>>
fn create( &self, tag: &str, ctx: &CustomNodeContext<'_>, ) -> Option<Arc<dyn CustomNode>>
Builds a node for tag, or None if the tag is not handled here.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".