Trait ISink

Source
pub trait ISink {
    type TInput;
    type TResult;
    type TError;

    // Required method
    fn send(&self, input: Self::TInput) -> Result<Self::TResult, Self::TError>;
}
Expand description

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.

Required Associated Types§

Required Methods§

Source

fn send(&self, input: Self::TInput) -> Result<Self::TResult, Self::TError>

Implementors§

Source§

impl<'a, TInput, TResult, TError> ISink for Sink<'a, TInput, TResult, TError>

Source§

type TInput = TInput

Source§

type TResult = TResult

Source§

type TError = TError

Source§

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>,

Source§

type TInput = UInput

Source§

type TResult = TResult

Source§

type TError = TError

Source§

impl<'a, TState, TInput, TResult, TError> ISink for StatefulSink<'a, TState, TInput, TResult, TError>
where TState: Clone,

Source§

type TInput = TInput

Source§

type TResult = TResult

Source§

type TError = TError