Trait ContextOperator

Source
pub trait ContextOperator<In> {
    type Out;

    // Required method
    fn next(&mut self, input: Value<In>) -> Value<Self::Out>;
}
Expand description

Operator that takes a Value as input and returns a Value as output. And can be converted to an operator without the Value wrapper.

Required Associated Types§

Source

type Out

The output type inside the Value wrapper.

Required Methods§

Source

fn next(&mut self, input: Value<In>) -> Value<Self::Out>

Apply the operator.

Implementors§

Source§

impl<In, Out> ContextOperator<In> for BoxContextOperator<In, Out>

Source§

type Out = Out

Source§

impl<In, P, Out> ContextOperator<In> for P
where P: Operator<Value<In>, Output = Value<Out>>,

Source§

type Out = Out

Source§

impl<T, P, F> ContextOperator<T> for InspectOperator<P, F>
where P: ContextOperator<T>, F: Fn(&T, &Context),

Source§

type Out = <P as ContextOperator<T>>::Out

Source§

impl<T, U, P, F> ContextOperator<T> for ThenOperator<P, F>
where P: ContextOperator<T>, F: FnMut(P::Out, &Context) -> U,

Source§

type Out = U