Skip to main content

TagHandler

Trait TagHandler 

Source
pub trait TagHandler: Send + Sync {
    // Required methods
    fn construct(&self, value: &str) -> Result<Value>;
    fn represent(&self, value: &Value) -> Result<String>;
}
Expand description

Trait for custom tag handlers

Required Methods§

Source

fn construct(&self, value: &str) -> Result<Value>

Construct a value from the tagged string

Source

fn represent(&self, value: &Value) -> Result<String>

Represent a value as a string for this tag

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§