pub trait NodeContent {
    fn new(content: &str) -> Option<Self>;
    fn get_val(&self) -> &str;
    fn gen_content(&self) -> String;
}
Expand description

Trait to define structs that model a node content.

Required Methods

Constructor.

Arguments
  • content - Node content.
Return
  • An Option with the node content.

Get node value.

Return
  • Node value.

Generate node content.

Use by serializers to create back the string of a node that is parsed by a NodeContent implementer.

Return
  • Node content.

Implementors