Skip to main content

Parser

Trait Parser 

Source
pub trait Parser<T>:
    Send
    + Sync
    + 'static {
    // Required methods
    fn parse<'life0, 'life1, 'async_trait>(
        &'life0 self,
        raw: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn format_instructions(&self) -> String;
}

Required Methods§

Source

fn parse<'life0, 'life1, 'async_trait>( &'life0 self, raw: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn format_instructions(&self) -> String

Implementors§

Source§

impl Parser<Value> for JsonParser

Source§

impl Parser<Value> for JsonSchemaParser

Source§

impl Parser<Value> for XmlParser

Source§

impl Parser<Value> for YamlParser

Source§

impl Parser<String> for EnumParser

Source§

impl Parser<Vec<String>> for CommaListParser

Source§

impl<P, T> Parser<T> for OutputFixingParser<P, T>
where P: Parser<T> + 'static, T: Send + 'static,

Source§

impl<P, T> Parser<T> for RetryWithErrorParser<P, T>
where P: Parser<T> + 'static, T: Send + 'static,

Source§

impl<T: DeserializeOwned + Send + Sync + 'static> Parser<T> for SchemaParser<T>