Skip to main content

Crate co_actor

Crate co_actor 

Source

Modules§

time
tokio

Structs§

ActionDispatch
Action Dispatch. Encasulate epic logic in a single future.
Actions
ActorHandle
Handle into an actor which can be used to send messages.
ActorInstance
The actual actor instance.
ActorSpawner
Actor Spawner with early access to the handle (which allow cyclic references).
EpicRuntime
Epic runtime to be uses as actor state. Expected to be called after the message has been applied to the state.
JoinEpic
Joins two epics into one.
LocalActorInstance
The actual actor instance.
LocalActorSpawner
Actor Spawner with early access to the handle (which allow cyclic references).
MergeEpic
Merge BoxEpic into one.
Response
Response.
ResponseBackPressureStream
A streaming response with backpressure (bounded).
ResponseBackPressureStreamReceiver
ResponseReceiver
ResponseStream
A streaming response.
ResponseStreamReceiver
ResponseStreams
SwitchEpic
Only allow to run epic once. Once the epic returns another stream the previous will be dropped.
TaskOptions
TaskSpawner
TracingEpic
Trace actions and state as debug messages.

Enums§

ActorError
ActorState
TaskError

Traits§

Actor
Simple actor model implementation. Accepts messages which will be applied to the actor state. Actor state is different to the actual actor instance in order to allow initialization of it within the actor context.
Epic
Epic.
EpicExt
LocalActor
A LocalActor will not moved between threads. This is sometimes necessary when interfacing with external code. This trait allows to implement such behaviour with same public interface as a normal [Actor] (ActorHandle). For new code that dont have this requirement is usually better to use [Actor] as it allows to use multithreading.
LocalTaskSpawner
Spawn a local (not Send) future.
Reducer
State reducer.

Type Aliases§

BoxEpic
LocalTaskHandle
TaskHandle