accepts 0.0.2

Minimal traits and blanket impls for sync/async acceptors (pipeline foundation)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use core::future::{Future, ready};

use crate::{Accepts, AsyncAccepts};

impl<Value> Accepts<Value> for () {
    fn accept(&self, _: Value) {}
}

impl<Value> AsyncAccepts<Value> for () {
    fn accept_async<'a>(&'a self, _: Value) -> impl Future<Output = ()> + 'a
    where
        Value: 'a,
    {
        ready(())
    }
}