- Producer <RT, OUT, A>
- Value
- Producer (Proxy<RT, Void, Unit, Unit, OUT, A> value)
- ToProxy ()
- Bind <S> (Func<A, Proxy<RT, Void, Unit, Unit, OUT, S>> f)
- Map <B> (Func<A, B> f)
- Bind <B> (Func<A, Producer<RT, OUT, B>> f)
- SelectMany <B> (Func<A, Producer<RT, OUT, B>> f)
- SelectMany <B, C> (Func<A, Producer<RT, OUT, B>> f, Func<A, B, C> project)
- Select <B> (Func<A, B> f)
- For <C1, C> (Func<OUT, Proxy<RT, Void, Unit, C1, C, Unit>> body)
- Action <B> (Proxy<RT, Void, Unit, Unit, OUT, B> r)
- PairEachRequestWithRespond <UOutA, AUInA> (Func<Void, Proxy<RT, UOutA, AUInA, Void, Unit, A>> lhs)
- ReplaceRequest <UOutA, AUInA> (Func<Void, Proxy<RT, UOutA, AUInA, Unit, OUT, Unit>> lhs)
- PairEachRespondWithRequest <DInC, DOutC> ( Func<OUT, Proxy<RT, Unit, OUT, DInC, DOutC, A>> rhs)
- ReplaceRespond <DInC, DOutC> ( Func<OUT, Proxy<RT, Void, Unit, DInC, DOutC, Unit>> rhs)
- Reflect ()
- Observe ()
- | (Producer<RT, OUT, A> p1, Consumer<RT, OUT, A> p2)
- | (Producer<RT, OUT, A> p1, Consumer<OUT, A> p2)
- Deconstruct (out Proxy<RT, Void, Unit, Unit, OUT, A> value)
- SelectMany <B> (Func<A, Release<B>> bind)
- SelectMany <B, C> (Func<A, Release<B>> bind, Func<A, B, C> project)
- SelectMany <B> (Func<A, Producer<OUT, B>> bind)
- SelectMany <B, C> (Func<A, Producer<OUT, B>> bind, Func<A, B, C> project)
- & ( Producer<RT, OUT, A> lhs, Producer<RT, OUT, A> rhs)
- Producer
- Pure <RT, OUT, R> (R value)
- yield <RT, OUT> (OUT value)
- yieldAll <RT, X> (IEnumerable<X> xs)
- yieldAll <RT, X> (IAsyncEnumerable<X> xs)
- yieldAll <RT, X> (IObservable<X> xs)
- repeatM <RT, A> (Aff<RT, A> ma)
- repeatM <RT, A> (Eff<RT, A> ma)
- repeatM <RT, A> (Aff<A> ma)
- repeatM <RT, A> (Eff<A> ma)
- lift <RT, OUT, R> (Eff<R> ma)
- lift <RT, OUT, R> (Aff<R> ma)
- lift <RT, OUT, R> (Eff<RT, R> ma)
- lift <RT, OUT, R> (Aff<RT, R> ma)
- use <RT, OUT, R> (Aff<R> ma)
- use <RT, OUT, R> (Eff<R> ma)
- use <RT, OUT, R> (Aff<RT, R> ma)
- use <RT, OUT, R> (Eff<RT, R> ma)
- use <RT, OUT, R> (Aff<R> ma, Func<R, Unit> dispose)
- use <RT, OUT, R> (Eff<R> ma, Func<R, Unit> dispose)
- use <RT, OUT, R> (Aff<RT, R> ma, Func<R, Unit> dispose)
- use <RT, OUT, R> (Eff<RT, R> ma, Func<R, Unit> dispose)
- release <RT, OUT, R> (R dispose)
- FoldUntil <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<A, bool> UntilValue)
- FoldWhile <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<A, bool> WhileValue)
- FoldUntil <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<S, bool> UntilState)
- FoldWhile <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<S, bool> WhileState)
- merge <RT, OUT> (Seq<Producer<RT, OUT, Unit>> ms)
- merge <RT, OUT> (params Queue<RT, OUT, Unit>[] ms)
- merge <RT, OUT> (params Producer<RT, OUT, Unit>[] ms)
- merge <RT, OUT> (params Proxy<RT, Void, Unit, Unit, OUT, Unit>[] ms)
- merge <RT, OUT> (Seq<Queue<RT, OUT, Unit>> ms)
- merge <RT, OUT> (Seq<Proxy<RT, Void, Unit, Unit, OUT, Unit>> ms)
class Producer <RT, OUT, A> Source #
Producers can only yield
Upstream | Downstream
+---------+
| |
Void <== <== Unit
| |
Unit ==> ==> OUT
| | |
+----|----+
|
A
method Proxy<RT, Void, Unit, Unit, OUT, A> ToProxy () Source #
Calling this will effectively cast the sub-type to the base.
This type wraps up a Proxy
for convenience, and so it's a Proxy
proxy. So calling this method
isn't exactly the same as a cast operation, as it unwraps the Proxy
from within. It has the same effect
however, and removes a level of indirection
returns | A general |
method Proxy<RT, Void, Unit, Unit, OUT, S> Bind <S> (Func<A, Proxy<RT, Void, Unit, Unit, OUT, S>> f) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Proxy<RT, Void, Unit, Unit, OUT, B> Map <B> (Func<A, B> f) Source #
Lifts a pure function into the Proxy
domain, causing it to map the bound value within
type | B | The mapped bound value type |
param | f | The map function |
returns | A new |
method Producer<RT, OUT, B> Bind <B> (Func<A, Producer<RT, OUT, B>> f) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Producer<RT, OUT, B> SelectMany <B> (Func<A, Producer<RT, OUT, B>> f) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Producer<RT, OUT, C> SelectMany <B, C> (Func<A, Producer<RT, OUT, B>> f, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Producer<RT, OUT, B> Select <B> (Func<A, B> f) Source #
Lifts a pure function into the Proxy
domain, causing it to map the bound value within
type | B | The mapped bound value type |
param | f | The map function |
returns | A new |
method Proxy<RT, Void, Unit, C1, C, A> For <C1, C> (Func<OUT, Proxy<RT, Void, Unit, C1, C, Unit>> body) Source #
For(body)
loops over the Proxy p
replacing each yield
with body
param | body | Any |
returns | A new |
method Proxy<RT, Void, Unit, Unit, OUT, B> Action <B> (Proxy<RT, Void, Unit, Unit, OUT, B> r) Source #
Applicative action
Invokes this Proxy
, then the Proxy r
param | r |
|
method Proxy<RT, UOutA, AUInA, Unit, OUT, A> PairEachRequestWithRespond <UOutA, AUInA> (Func<Void, Proxy<RT, UOutA, AUInA, Void, Unit, A>> lhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
(f +>> p) pairs each 'request' in this
with a 'respond' in lhs
.
method Proxy<RT, UOutA, AUInA, Unit, OUT, A> ReplaceRequest <UOutA, AUInA> (Func<Void, Proxy<RT, UOutA, AUInA, Unit, OUT, Unit>> lhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, Void, Unit, DInC, DOutC, A> PairEachRespondWithRequest <DInC, DOutC> ( Func<OUT, Proxy<RT, Unit, OUT, DInC, DOutC, A>> rhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, Void, Unit, DInC, DOutC, A> ReplaceRespond <DInC, DOutC> ( Func<OUT, Proxy<RT, Void, Unit, DInC, DOutC, Unit>> rhs) Source #
Used by the various composition functions and when composing proxies with the |
operator. You usually
wouldn't need to call this directly, instead either pipe them using |
or call Proxy.compose(lhs, rhs)
method Proxy<RT, OUT, Unit, Unit, Void, A> Reflect () Source #
Reverse the arrows of the Proxy
to find its dual.
returns | The dual of |
method Proxy<RT, Void, Unit, Unit, OUT, A> Observe () Source #
Observe(lift (Pure(r))) = Observe(Pure(r))
Observe(lift (m.Bind(f))) = Observe(lift(m.Bind(x => lift(f(x)))))
This correctness comes at a small cost to performance, so use this function sparingly. This function is a convenience for low-level pipes implementers. You do not need to use observe if you stick to the safe API.
method void Deconstruct (out Proxy<RT, Void, Unit, Unit, OUT, A> value) Source #
method Producer<RT, OUT, B> SelectMany <B> (Func<A, Release<B>> bind) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Producer<RT, OUT, C> SelectMany <B, C> (Func<A, Release<B>> bind, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Producer<RT, OUT, B> SelectMany <B> (Func<A, Producer<OUT, B>> bind) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
method Producer<RT, OUT, C> SelectMany <B, C> (Func<A, Producer<OUT, B>> bind, Func<A, B, C> project) Source #
Monadic bind operation, for chaining Proxy
computations together.
type | B | The mapped bound value type |
param | f | The bind function |
returns | A new |
operator | (Producer<RT, OUT, A> p1, Consumer<RT, OUT, A> p2) Source #
Compose a Producer
and a Consumer
together into an Effect
.
param | p1 |
|
param | p2 |
|
returns |
|
Producers can only yield
Upstream | Downstream
+---------+
| |
Void <== <== Unit
| |
Unit ==> ==> OUT
| | |
+----|----+
|
A
method Producer<RT, OUT, R> Pure <RT, OUT, R> (R value) Source #
Monad return / pure
method Producer<RT, OUT, Unit> yield <RT, OUT> (OUT value) Source #
Send a value downstream (whilst in a producer)
This is the simpler version (fewer generic arguments required) of yield
that works
for producers.
method Producer<RT, X, Unit> yieldAll <RT, X> (IEnumerable<X> xs) Source #
method Producer<RT, X, Unit> yieldAll <RT, X> (IAsyncEnumerable<X> xs) Source #
method Producer<RT, X, Unit> yieldAll <RT, X> (IObservable<X> xs) Source #
method Producer<RT, A, Unit> repeatM <RT, A> (Aff<RT, A> ma) Source #
Repeat a monadic action indefinitely, yielding each result
method Producer<RT, A, Unit> repeatM <RT, A> (Eff<RT, A> ma) Source #
Repeat a monadic action indefinitely, yielding each result
method Producer<RT, A, Unit> repeatM <RT, A> (Aff<A> ma) Source #
Repeat a monadic action indefinitely, yielding each result
method Producer<RT, A, Unit> repeatM <RT, A> (Eff<A> ma) Source #
Repeat a monadic action indefinitely, yielding each result
method Producer<RT, OUT, R> lift <RT, OUT, R> (Eff<R> ma) Source #
Lift the IO monad into the Producer monad transformer (a specialism of the Proxy monad transformer)
method Producer<RT, OUT, R> lift <RT, OUT, R> (Aff<R> ma) Source #
Lift the IO monad into the Producer monad transformer (a specialism of the Proxy monad transformer)
method Producer<RT, OUT, R> lift <RT, OUT, R> (Eff<RT, R> ma) Source #
Lift the IO monad into the Producer monad transformer (a specialism of the Proxy monad transformer)
method Producer<RT, OUT, R> lift <RT, OUT, R> (Aff<RT, R> ma) Source #
Lift the IO monad into the Producer monad transformer (a specialism of the Proxy monad transformer)
method Producer<RT, OUT, R> use <RT, OUT, R> (Aff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, R> use <RT, OUT, R> (Eff<R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, R> use <RT, OUT, R> (Aff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, R> use <RT, OUT, R> (Eff<RT, R> ma) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, R> use <RT, OUT, R> (Aff<R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, R> use <RT, OUT, R> (Eff<R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, R> use <RT, OUT, R> (Aff<RT, R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, R> use <RT, OUT, R> (Eff<RT, R> ma, Func<R, Unit> dispose) Source #
Lift am IO monad into the Proxy
monad transformer
method Producer<RT, OUT, Unit> release <RT, OUT, R> (R dispose) Source #
Release a previously used resource
method Producer<RT, S, Unit> FoldUntil <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<A, bool> UntilValue) Source #
Folds values coming down-stream, when the predicate returns true the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | UntilValue | Predicate |
returns | A pipe that folds |
method Producer<RT, S, Unit> FoldWhile <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<A, bool> WhileValue) Source #
Folds values coming down-stream, when the predicate returns true the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | UntilValue | Predicate |
returns | A pipe that folds |
method Producer<RT, S, Unit> FoldUntil <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<S, bool> UntilState) Source #
Folds values coming down-stream, when the predicate returns true the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | UntilValue | Predicate |
returns | A pipe that folds |
method Producer<RT, S, Unit> FoldWhile <RT, S, A> (this Producer<RT, S, A> ma, S Initial, Func<S, A, S> Fold, Func<S, bool> WhileState) Source #
Folds values coming down-stream, when the predicate returns true the folded value is yielded
param | Initial | Initial state |
param | Fold | Fold operation |
param | UntilValue | Predicate |
returns | A pipe that folds |
method Producer<RT, OUT, Unit> merge <RT, OUT> (Seq<Producer<RT, OUT, Unit>> ms) Source #
Merge a sequence of producers into a single producer
The merged producer completes when all component producers have completed
param | ms | Sequence of producers to merge |
returns | Merged producers |
method Producer<RT, OUT, Unit> merge <RT, OUT> (params Queue<RT, OUT, Unit>[] ms) Source #
Merge an array of queues into a single producer
The merged producer completes when all component queues have completed
param | ms | Sequence of queues to merge |
returns | Queues merged into a single producer |
method Producer<RT, OUT, Unit> merge <RT, OUT> (params Producer<RT, OUT, Unit>[] ms) Source #
Merge an array of producers into a single producer
The merged producer completes when all component producers have completed
param | ms | Sequence of producers to merge |
returns | Merged producers |
method Producer<RT, OUT, Unit> merge <RT, OUT> (params Proxy<RT, Void, Unit, Unit, OUT, Unit>[] ms) Source #
Merge an array of producers into a single producer
The merged producer completes when all component producers have completed
param | ms | Sequence of producers to merge |
returns | Merged producers |
method Producer<RT, OUT, Unit> merge <RT, OUT> (Seq<Queue<RT, OUT, Unit>> ms) Source #
Merge a sequence of queues into a single producer
The merged producer completes when all component queues have completed
param | ms | Sequence of queues to merge |
returns | Queues merged into a single producer |
method Producer<RT, OUT, Unit> merge <RT, OUT> (Seq<Proxy<RT, Void, Unit, Unit, OUT, Unit>> ms) Source #
Merge a sequence of producers into a single producer
The merged producer completes when all component producers have completed
param | ms | Sequence of producers to merge |
returns | Merged producers |