Packages

final class SingleAssignCancelableF[F[_]] extends Bool[F]

Represents a monix.catnap.CancelableF that can be assigned only once to another cancelable reference.

If the assignment happens after this cancelable has been canceled, then on assignment the reference will get canceled too. If the assignment already happened, then a second assignment will raise an error.

Useful in case you need a forward reference.

Source
SingleAssignCancelableF.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SingleAssignCancelableF
  2. Bool
  3. BooleanCancelableF
  4. AssignableCancelableF
  5. CancelableF
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. val cancel: CancelToken[F]
    Definition Classes
    SingleAssignCancelableFCancelableF
  2. val isCanceled: F[Boolean]

    returns

    true in case this cancelable hasn't been canceled, or false otherwise.

    Definition Classes
    SingleAssignCancelableFBooleanCancelableF
  3. def set(ref: CancelableF[F]): F[Unit]

    Sets the underlying reference to the given CancelableF reference.

    Sets the underlying reference to the given CancelableF reference.

    Contract:

    • the given reference gets canceled in case the assignable was already canceled
    • this operation might throw an error if the contract of the implementation doesn't allow for calling set multiple times (e.g. SingleAssignCancelableF)
    Definition Classes
    SingleAssignCancelableFAssignableCancelableF