pub trait Serializer {
// Required methods
fn can_serialize(&self, node: &Node) -> bool;
fn serialize(
&self,
node: &Node,
options: &FormatOptions,
context: &FormatContext,
) -> Result<String, String>;
// Provided method
fn priority(&self) -> i32 { ... }
}Expand description
Custom serializer support Trait for custom node serializers
Required Methods§
Sourcefn can_serialize(&self, node: &Node) -> bool
fn can_serialize(&self, node: &Node) -> bool
Check if this serializer can handle the given node