Trait sink::ISink [−][src]
pub trait ISink { type TInput; type TResult; type TError; fn send(&self, input: Self::TInput) -> Result<Self::TResult, Self::TError>; }
The ISink trait aims to provide an abstraction for a thing which can be sent values and return a Result indicating success / failure of receipt.
As a base primitive this should enable a message oriented variant of the inbound params to the familiar imperitive Result 'and_then' composition pattern.
Immediately responding to send with Result<TResult, TError> enabling implementations to encapsulate both sync and async processing with a sync response.
Associated Types
Required Methods
Implementors
impl<'a, TInput, UInput, TResult, TError, TSink> ISink for SinkMap<'a, TInput, UInput, TResult, TError, TSink> where
TSink: ISink<TInput = TInput, TResult = TResult, TError = TError>, type TInput = UInput; type TResult = TResult; type TError = TError;impl<'a, TInput, TResult, TError> ISink for Sink<'a, TInput, TResult, TError> type TInput = TInput; type TResult = TResult; type TError = TError;
impl<'a, TState, TInput, TResult, TError> ISink for StatefulSink<'a, TState, TInput, TResult, TError> where
TState: Clone, type TInput = TInput; type TResult = TResult; type TError = TError;