Trait socarel::NodeContent [−][src]
pub trait NodeContent {
fn new(content: &str) -> Option<Self>
where
Self: Sized;
fn get_val(&self) -> &str;
fn gen_content(&self) -> String;
}
Expand description
Trait to define structs that model a node content.
Required methods
fn gen_content(&self) -> String
fn gen_content(&self) -> String
Generate node content.
Use by serializers to create back the string of a node that is parsed by a NodeContent implementer.
Return
- Node content.