pub trait Component {
// Required methods
fn name(&self) -> &str;
fn render(
&self,
attributes: &HashMap<String, String>,
children: &[Node],
) -> Result<String, Error>;
// Provided method
fn css(&self) -> Option<String> { ... }
}Expand description
Trait for custom markdown components
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".