pub trait MailParser: Default {
    fn parse_sync(
        &mut self,
        raw: Vec<Vec<u8>>
    ) -> ParserResult<Either<RawBody, Mail>>; fn parse<'a, 'async_trait>(
        &'a mut self,
        stream: impl 'async_trait + Stream<Item = Result<Vec<u8>, ParserError>> + Unpin + Send + 'a
    ) -> Pin<Box<dyn Future<Output = ParserResult<Either<RawBody, Mail>>> + Send + 'async_trait>>
    where
        Self: Send + 'async_trait,
        'a: 'async_trait
, { ... } fn convert(self, input: &RawBody) -> ParserResult<Option<Mail>> { ... } }
Expand description

An abstract mail parser

Required Methods§

From a buffer of strings, return either:

Errors
  • the input is not compliant

Provided Methods§

Errors
  • the input is not compliant

Implementors§