final class StateSnapshotF[F[_], A[_], S](val value: S, val underlyingSetFn: Reusable[F => S], val reusability: Reusability[S])(implicit FF: UnsafeSync[F], AA: Async[A]) extends Write[F, A, S]
- Companion:
- object
trait Write[F, A, S]
trait ModState[F, A, S]
trait SetState[F, A, S]
trait Base[F, A]
class Object
trait Matchable
class Any
Type members
Types
Value members
Concrete methods
override def modStateOption[G[_]](mod: S => Option[S], callback: => G[Unit])(implicit G: Dispatch[G]): F[Unit]
- Value parameters:
- callback
Executed regardless of whether state is changed.
- Definition Classes
- ModState
override def setStateOption[G[_]](newState: Option[S], callback: => G[Unit])(implicit G: Dispatch[G]): F[Unit]
- Value parameters:
- callback
Executed regardless of whether state is changed.
- Definition Classes
- SetState
Unsafe because writes may be dropped.
Unsafe because writes may be dropped.
Eg. if you widen a StateSnapshot[Banana]
into StateSnapshot[Food]
, calling setState(banana2)
will work
but setState(pasta)
will be silently ignored.
THIS WILL VOID REUSABILITY.
THIS WILL VOID REUSABILITY.
The resulting StateSnapshotF[F, A, S]
will not be reusable.
THIS WILL VOID REUSABILITY.
THIS WILL VOID REUSABILITY.
The resulting StateSnapshot[T]
will not be reusable.
THIS WILL VOID REUSABILITY.
THIS WILL VOID REUSABILITY.
The resulting StateSnapshot[T]
will not be reusable.