LanguageExt.Pipes

LanguageExt.Pipes Concurrent Outbox

Contents

record Outbox <A> Source #

Properties

property Outbox<A> Empty Source #

An outbox that never yields a value

Methods

method IO<A> Read () Source #

Read value from the outbox

Raises a Errors.OutboxChannelClosed if the channel is closed or empty

Parameters

returns

First available value from the channel

method Outbox<B> Map <B> (Func<A, B> f) Source #

Functor map

method Outbox<B> Bind <B> (Func<A, Outbox<B>> f) Source #

Monad bind

method Outbox<B> ApplyBack <B> (Outbox<Func<A, B>> ff) Source #

Applicative apply

method Outbox<A> Combine (Outbox<A> rhs) Source #

Combine two outboxes into a single outbox. The value streams are both merged into a new stream. Values are yielded as they become available.

Parameters

param rhs

Right hand side

returns

Merged stream of values

method Outbox<A> Choose (Outbox<A> rhs) Source #

Choose a value from the first Outbox to successfully yield

Parameters

param rhs
returns

Value from this Outbox if there are any available, if not, from rhs. If rhs is also empty then Errors.OutboxChannelClosed is raised

method Outbox<B> Bind <B> (Func<A, K<Outbox, B>> f) Source #

Monad bind

method ProducerT<A, M, Unit> ToProducerT <M> () Source #

where M : Monad<M>

Convert Outbox to a ProducerT pipe component

Parameters

type M

Monad to lift (must support IO)

returns

ProducerT

method Producer<RT, A, Unit> ToProducer <RT> () Source #

Convert Outbox to a Producer pipe component

Parameters

returns

Producer

Operators

operator + (Outbox<A> lhs, Outbox<A> rhs) Source #

Combine two outboxes into a single outbox. The value streams are both merged into a new stream. Values are yielded as they become available.

Parameters

param lhs

Left hand side

param rhs

Right hand side

returns

Merged stream of values

operator | (Outbox<A> lhs, Outbox<A> rhs) Source #

Choose a value from the first Outbox to successfully yield

Parameters

param lhs

Left hand side

param rhs

Right hand side

returns

Value from the lhs Outbox if there are any available, if not, from rhs. If rhs is also empty then Errors.OutboxChannelClosed is raised

class OutboxExtensions Source #

Methods

method Outbox<A> As <A> (this K<Outbox, A> ma) Source #

Downcast

class Outbox Source #

class Outbox Source #