[][src]Trait date_time_parser::Recognizable

pub trait Recognizable: Sized {
    fn recognize(text: &str) -> Option<Self>;
fn describe() -> &'static str; }

An interface for dealing with parsing unstructured text. Implement this trait for your abstract syntax when parsing.

Required methods

fn recognize(text: &str) -> Option<Self>

Takes unstructed text, and returns an instance of the abstract syntax if a match is found.

fn describe() -> &'static str

Returns a string to describe the abstract syntax.

Loading content...

Implementations on Foreign Types

impl Recognizable for Weekday[src]

Parsing a str into a Weekday uses the format %W.

Loading content...

Implementors

Loading content...