implicit final class RefOps[F[_], A] extends AnyVal
- Source
- Ref.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- RefOps
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def modifyMaybe[B](f: (A) => Option[(A, B)])(implicit F: Monad[F]): F[Option[B]]
Like
modify
, but can terminate early without retrying.Like
modify
, but can terminate early without retrying. Returns an optional value if the update completed. - def modifyOr[E, B](f: (A) => Either[E, (A, B)])(implicit F: Monad[F]): F[Either[E, B]]
Like
modify
, but can terminate early with an error value without retrying.Like
modify
, but can terminate early with an error value without retrying. Returns a value or error based on whether the update short-circuited. - def toString(): String
- Definition Classes
- Any
- def updateMaybe(f: (A) => Option[A])(implicit F: Monad[F]): F[Boolean]
Like
update
, but can terminate early without retrying.Like
update
, but can terminate early without retrying. Returns whether or not the update short-circuited. - def updateOr[E](f: (A) => Either[E, A])(implicit F: Monad[F]): F[Option[E]]
Like
update
, but can terminate early with an error value without retrying.Like
update
, but can terminate early with an error value without retrying. Returns an optional error if the update short-circuited.
This is the API documentation for the cats-effect library.
See the cats.effect package for a quick overview.
Links
Canonical documentation links:
Related Cats links (the core):