Function akka_persistence_rs::entity_manager::run_with_hasher
source · pub async fn run_with_hasher<A, B, S>(
behavior: B,
adapter: A,
receiver: Receiver<Message<B::Command>>,
capacity: NonZeroUsize,
hash_builder: S
) -> Result<()>where
B: EventSourcedBehavior + Send + Sync + 'static,
B::Command: Send,
B::State: Send + Sync,
A: SourceProvider<B::Event> + Handler<B::Event> + Send + 'static,
S: BuildHasher + Send + Sync,Expand description
Manages the lifecycle of entities given a specific behavior. Entity managers are established given a source of events associated with an entity type. That source is consumed by subsequently telling the entity manager to run, generally on its own task.
Commands are sent to a channel established for the entity manager. Effects may be produced as a result of performing a command, which may, in turn, perform side effects and yield events.
A hasher for entity ids can also be supplied which will be used to control the internal caching of entities.