idem-handler 0.1.0

Common handler mechanism used in other idemio products.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::handler::Handler;
use idem_handler_config::config::ProviderType;

pub trait HandlerFactory<Input, Output, Metadata>
where
    Input: Default + Send,
    Output: Default + Send,
    Metadata: Send
{

    type Err;
    type CreatedHandler: Handler<Input, Output, Metadata>;

    fn create_handler(
        name: &str,
        provider_type: ProviderType,
    ) -> Result<Self::CreatedHandler, Self::Err>;
}