StateReader

endless.core.entity.StateReader
trait StateReader[F[_], S]

StateReader[F, S] is the ability to read a value of type S from a shared environment in context F, where that value is semantically understood as the current state of the entity.

Note that this is equivalent to Ask[F, S] in cats mtl.

Type parameters

F

context

S

state

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait DurableEntity[F, S]
trait Effector[F, S, Alg]
trait Entity[F, S, E]
class EntityTLiftInstance[F, S, E]
trait StateReaderHelpers[F, S]

Members list

Value members

Abstract methods

def read: F[Option[S]]

Read the entity state, returns None if the entity doesn't yet exist

Read the entity state, returns None if the entity doesn't yet exist

Attributes

Returns

optional state in F context