pub trait Block {
type Input;
type Node;
type State;
// Required method
fn parse(
&self,
editor: &Editor<Self::Node, Self::State, Self::Input>,
input: &Self::Input,
) -> Self::Node;
// Provided methods
fn hook(&self, editor: &mut Editor<Self::Node, Self::State, Self::Input>) { ... }
fn accepts(&self, input: &Self::Input) -> bool { ... }
}
Expand description
Trait for defining blocks that process input nodes