trait StateAccess[F[_], S] extends Write[F, S]
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.
- F
The type of effect when accessing state.
- S
State type.
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- StateAccess
- Write
- ModState
- SetState
- Base
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
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]
- Attributes
- protected
- Definition Classes
- Base
-
abstract
def
modStateOption(mod: (S) ⇒ Option[S], callback: Callback): F[Unit]
- callback
Executed regardless of whether state is changed.
- Definition Classes
- ModState
-
abstract
def
setStateOption(newState: Option[S], callback: Callback): F[Unit]
- callback
Executed regardless of whether state is changed.
- Definition Classes
- SetState
- 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
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
async(f: (Callback) ⇒ F[Unit]): AsyncCallback[Unit]
- Attributes
- protected
- Definition Classes
- Base
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
modState(mod: (S) ⇒ S, callback: Callback): F[Unit]
- callback
Executed after state is changed.
- Definition Classes
- ModState
-
final
def
modState(mod: (S) ⇒ S): F[Unit]
- Definition Classes
- ModState
-
final
def
modStateAsync(mod: (S) ⇒ S): AsyncCallback[Unit]
- Definition Classes
- ModState
-
final
def
modStateOption(mod: (S) ⇒ Option[S]): F[Unit]
- Definition Classes
- ModState
-
final
def
modStateOptionAsync(mod: (S) ⇒ Option[S]): AsyncCallback[Unit]
- Definition Classes
- ModState
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
setState(newState: S, callback: Callback): F[Unit]
- callback
Executed after state is changed.
- Definition Classes
- SetState
-
final
def
setState(newState: S): F[Unit]
- Definition Classes
- SetState
-
final
def
setStateAsync(newState: S): AsyncCallback[Unit]
- Definition Classes
- SetState
-
final
def
setStateOption(newState: Option[S]): F[Unit]
- Definition Classes
- SetState
-
final
def
setStateOptionAsync(newState: Option[S]): AsyncCallback[Unit]
- Definition Classes
- SetState
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toModStateFn: ModStateFn[F, S]
- Definition Classes
- ModState
-
def
toSetStateFn: SetStateFn[F, S]
- Definition Classes
- SetState
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- final def withEffectsImpure(implicit t: Trans[F, Id]): WithEffect[Id]
- final def withEffectsPure(implicit t: Trans[F, CallbackTo]): WithEffect[CallbackTo]
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.