Struct sink::SinkMap [−][src]
pub struct SinkMap<'a, TInput, UInput, TResult, TError, TSink: Sized> where
TSink: ISink<TInput = TInput, TResult = TResult, TError = TError>, { /* fields omitted */ }
Transforms incomming data from source type to the type epxected by the wrapped ISink.
Explicitely building the SinkMap from ::new
Methods
impl<'a, TInput, UInput, TResult, TError, TSink> SinkMap<'a, TInput, UInput, TResult, TError, TSink> where
TSink: ISink<TInput = TInput, TResult = TResult, TError = TError>,
[src]
impl<'a, TInput, UInput, TResult, TError, TSink> SinkMap<'a, TInput, UInput, TResult, TError, TSink> where
TSink: ISink<TInput = TInput, TResult = TResult, TError = TError>,
pub fn new<F: 'a>(target: TSink, map: F) -> Self where
F: Fn(UInput) -> TInput + 'a,
[src]
pub fn new<F: 'a>(target: TSink, map: F) -> Self where
F: Fn(UInput) -> TInput + 'a,
Build a new SinkMap which uses the provided map to translate the incoming values into the target's expected type and an owned target allowing the caller to decide sharing rules
Trait Implementations
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>,
[src]
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>,