Dequeue

trait Dequeue[F[_], A] extends Queue[F, A] with DequeueSource[F, A] with DequeueSink[F, A]
Companion:
object
trait DequeueSink[F, A]
trait DequeueSource[F, A]
class Queue[F, A]
trait QueueSink[F, A]
trait QueueSource[F, A]
class Object
trait Matchable
class Any
Dequeue[F, A]

Value members

Abstract methods

def reverse: F[Unit]

Reverse the dequeue in constant time

Reverse the dequeue in constant time

Concrete methods

override def mapK[G[_]](f: FunctionK[F, G]): Dequeue[G, A]

Modifies the context in which this dequeue is executed using the natural transformation f.

Modifies the context in which this dequeue is executed using the natural transformation f.

Returns:

a queue in the new context obtained by mapping the current one using f

Definition Classes

Inherited methods

override def offer(a: A): F[Unit]

Alias for offerBack in order to implement Queue

Alias for offerBack in order to implement Queue

Definition Classes
Inherited from:
DequeueSink
def offerBack(a: A): F[Unit]

Enqueues the given element at the back of the dequeue, possibly fiber blocking until sufficient capacity becomes available.

Enqueues the given element at the back of the dequeue, possibly fiber blocking until sufficient capacity becomes available.

Value parameters:
a

the element to be put at the back of the dequeue

Inherited from:
DequeueSink
def offerFront(a: A): F[Unit]

Enqueues the given element at the front of the dequeue, possibly fiber blocking until sufficient capacity becomes available.

Enqueues the given element at the front of the dequeue, possibly fiber blocking until sufficient capacity becomes available.

Value parameters:
a

the element to be put at the back of the dequeue

Inherited from:
DequeueSink
def size: F[Int]
Inherited from:
QueueSource
override def take: F[A]

Alias for takeFront in order to implement Queue

Alias for takeFront in order to implement Queue

Definition Classes
Inherited from:
DequeueSource
def takeBack: F[A]

Dequeues an element from the back of the dequeue, possibly fiber blocking until an element becomes available.

Dequeues an element from the back of the dequeue, possibly fiber blocking until an element becomes available.

Inherited from:
DequeueSource
def takeFront: F[A]

Dequeues an element from the front of the dequeue, possibly fiber blocking until an element becomes available.

Dequeues an element from the front of the dequeue, possibly fiber blocking until an element becomes available.

Inherited from:
DequeueSource
override def tryOffer(a: A): F[Boolean]

Alias for tryOfferBack in order to implement Queue

Alias for tryOfferBack in order to implement Queue

Definition Classes
Inherited from:
DequeueSink
def tryOfferBack(a: A): F[Boolean]

Attempts to enqueue the given element at the back of the dequeue without semantically blocking.

Attempts to enqueue the given element at the back of the dequeue without semantically blocking.

Value parameters:
a

the element to be put at the back of the dequeue

Returns:

an effect that describes whether the enqueuing of the given element succeeded without blocking

Inherited from:
DequeueSink
def tryOfferFront(a: A): F[Boolean]

Attempts to enqueue the given element at the front of the dequeue without semantically blocking.

Attempts to enqueue the given element at the front of the dequeue without semantically blocking.

Value parameters:
a

the element to be put at the back of the dequeue

Returns:

an effect that describes whether the enqueuing of the given element succeeded without blocking

Inherited from:
DequeueSink
override def tryTake: F[Option[A]]

Alias for tryTakeFront in order to implement Queue

Alias for tryTakeFront in order to implement Queue

Definition Classes
Inherited from:
DequeueSource
def tryTakeBack: F[Option[A]]

Attempts to dequeue an element from the back of the dequeue, if one is available without fiber blocking.

Attempts to dequeue an element from the back of the dequeue, if one is available without fiber blocking.

Returns:

an effect that describes whether the dequeueing of an element from the dequeue succeeded without blocking, with None denoting that no element was available

Inherited from:
DequeueSource
def tryTakeFront: F[Option[A]]

Attempts to dequeue an element from the front of the dequeue, if one is available without fiber blocking.

Attempts to dequeue an element from the front of the dequeue, if one is available without fiber blocking.

Returns:

an effect that describes whether the dequeueing of an element from the dequeue succeeded without blocking, with None denoting that no element was available

Inherited from:
DequeueSource