DequeueSink

cats.effect.std.DequeueSink
See theDequeueSink companion object
trait DequeueSink[F[_], A] extends QueueSink[F, A]

Attributes

Companion:
object
Source:
Dequeue.scala
Graph
Supertypes
trait QueueSink[F, A]
class Object
trait Matchable
class Any
Known subtypes
trait Dequeue[F, A]

Members list

Concise view

Value members

Abstract methods

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.

Attributes

a

the element to be put at the back of the dequeue

Source:
Dequeue.scala
def offerFront(a: A): F[Unit]

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

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

Attributes

a

the element to be put at the back of the dequeue

Source:
Dequeue.scala
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.

Attributes

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

Source:
Dequeue.scala
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.

Attributes

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

Source:
Dequeue.scala

Concrete methods

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

Alias for offerBack in order to implement Queue

Alias for offerBack in order to implement Queue

Attributes

Definition Classes
Source:
Dequeue.scala
override def tryOffer(a: A): F[Boolean]

Alias for tryOfferBack in order to implement Queue

Alias for tryOfferBack in order to implement Queue

Attributes

Definition Classes
Source:
Dequeue.scala
def tryOfferBackN(list: List[A])(implicit F: Monad[F]): F[List[A]]

Attempts to enqueue the given elements at the back of the queue without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Attempts to enqueue the given elements at the back of the queue without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Attributes

list

the elements to be put at the back of the queue

Returns:

an effect that contains the remaining valus that could not be offered.

Source:
Dequeue.scala
def tryOfferFrontN(list: List[A])(implicit F: Monad[F]): F[List[A]]

Attempts to enqueue the given elements at the front of the queue without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Attempts to enqueue the given elements at the front of the queue without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Attributes

list

the elements to be put at the front of the queue

Returns:

an effect that contains the remaining valus that could not be offered.

Source:
Dequeue.scala

Inherited methods

def tryOfferN(list: List[A])(implicit F: Monad[F]): F[List[A]]

Attempts to enqueue the given elements at the back of the queue without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Attempts to enqueue the given elements at the back of the queue without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Attributes

list

the elements to be put at the back of the queue

Returns:

an effect that contains the remaining valus that could not be offered.

Inherited from:
QueueSink
Source:
Queue.scala