[−][src]Function lwactors::actor
pub fn actor<A, S, R, E>(
executor: impl SpawnExt,
initial_state: S
) -> ActorSender<A, R, E> where
A: Action<State = S, Result = R, Error = E> + Send + 'static,
S: Send + 'static,
R: Send + 'static,
E: Send + 'static,
Construct a new actor, requires an Executor
and an initial state. Returns a reference that can be cheaply
cloned and passed between threads. A specific implementation is expected to wrap this return value and implement
the required custom logic.