pub trait IComponentFunction<TMessage, TConfig>: Send {
    // Required method
    fn call(
        &self,
        input: ComponentInput<TMessage>,
        output: ComponentOutput<TMessage>,
        config: TConfig,
        cache: Cache<TMessage>
    ) -> BoxFuture<'static, Result<(), ComponentError>>;
}
Expand description

Трейт для функции компонента

Required Methods§

source

fn call( &self, input: ComponentInput<TMessage>, output: ComponentOutput<TMessage>, config: TConfig, cache: Cache<TMessage> ) -> BoxFuture<'static, Result<(), ComponentError>>

Implementors§

source§

impl<T, F, TMessage, TConfig> IComponentFunction<TMessage, TConfig> for T
where T: Fn(ComponentInput<TMessage>, ComponentOutput<TMessage>, TConfig, Cache<TMessage>) -> F + Send, F: Future<Output = Result<(), ComponentError>> + 'static + Send,