blob: c41b716d16718b8fc2b80cdcb04a51f0c6676de2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
use std::fmt::Display;
use crate::ChainProcess;
#[doc(hidden)]
pub mod error;
/// Takes over a type (G: Previous) and converts it to another [AnyOutput](./struct.AnyOutput.html)
pub trait Chain<G>
where
G: Display,
{
/// The previous type in the chain
type Previous;
/// Process the previous value and return a future that resolves to a [`ChainProcess<G>`](./enum.ChainProcess.html)
#[cfg(feature = "async")]
fn proc(p: Self::Previous) -> impl Future<Output = ChainProcess<G>> + Send;
#[cfg(not(feature = "async"))]
fn proc(p: Self::Previous) -> ChainProcess<G>;
}
|