use std::{future::Future, io::Result};
use crate::mail::Message;
pub trait Receiver {
type Current<'cx>: Future<Output = Result<Message>> + Send + Unpin + 'cx
where
Self: 'cx;
type Next<'cx>: Future<Output = Result<bool>> + Send + Unpin + 'cx
where
Self: 'cx;
fn current<'cx, 'a>(&'a mut self) -> Self::Current<'cx>
where
'a: 'cx;
fn next<'cx, 'a>(&'a mut self) -> Self::Next<'cx>
where
'a: 'cx;
}