teo_runtime/pipeline/item/
creator.rs

1use crate::arguments::Arguments;
2use teo_result::Result;
3use crate::pipeline::item::item_impl::ItemImpl;
4use super::templates::call::Call;
5
6pub trait Creator {
7    fn call(&self, arguments: Arguments) -> Result<ItemImpl>;
8}
9
10impl<F> Creator for F where
11    F: Fn(Arguments) -> Result<ItemImpl> {
12    fn call(&self, args: Arguments) -> Result<ItemImpl> {
13        self(args)
14    }
15}