Skip to main content

CustomTagParser

Trait CustomTagParser 

Source
pub trait CustomTagParser {
    type Output;

    // Required method
    fn parse(&mut self, s: &str) -> Option<Self::Output>;
}
Expand description

A common trait for user to provide custom tag parser to a tag convertor.

Closure FnMut(&str) -> Output and NoopCustomTagParser impl this trait for convenient.

Required Associated Types§

Source

type Output

Custom tag type.

Required Methods§

Source

fn parse(&mut self, s: &str) -> Option<Self::Output>

Parse string to custom tag type.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§