trait
StateAccess[F[_], S] extends Write[F, S]
Type Members
-
final
type
State = S
-
abstract
type
WithEffect[F2[_]] <: StateAccess[F2[_], S]
-
abstract
type
WithMappedState[S2] <: StateAccess[F, S2]
Abstract Value Members
-
implicit abstract
def
F: Effect[F]
-
abstract
def
modStateOption(mod: (S) ⇒ Option[S], callback: Callback): F[Unit]
-
abstract
def
setStateOption(newState: Option[S], callback: Callback): F[Unit]
-
abstract
def
state: F[State]
-
abstract
def
withEffect[F2[_]](implicit t: Trans[F, F2]): WithEffect[F2]
-
abstract
def
xmapState[S2](f: (S) ⇒ S2)(g: (S2) ⇒ S): WithMappedState[S2]
-
abstract
def
zoomState[S2](get: (S) ⇒ S2)(set: (S2) ⇒ (S) ⇒ S): WithMappedState[S2]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
modState(mod: (S) ⇒ S, callback: Callback): F[Unit]
-
final
def
modState(mod: (S) ⇒ S): F[Unit]
-
final
def
modStateOption(mod: (S) ⇒ Option[S]): F[Unit]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
setState(newState: S, callback: Callback): F[Unit]
-
final
def
setState(newState: S): F[Unit]
-
final
def
setStateOption(newState: Option[S]): F[Unit]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toModStateFn: ModStateFn[F, S]
-
def
toSetStateFn: SetStateFn[F, S]
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
final
def
withEffectsImpure(implicit t: Trans[F, Id]): WithEffect[Id]
-
Inherited from Write[F, S]
Inherited from AnyRef
Inherited from Any
Base class for something that has read/write state access (under the same effect type).
Passing this around (top-level) is fine but do not use it in a generic/library/helper method. In intermediary positions, use StateAccessor instead.
The type of effect when accessing state.
State type.