reifydb_runtime/actor/system/
mod.rs1#[cfg(reifydb_dst)]
5pub mod dst;
6
7#[cfg(all(not(reifydb_single_threaded), not(reifydb_dst)))]
8pub mod host;
9
10#[cfg(all(reifydb_single_threaded, not(reifydb_dst)))]
11pub mod wasm;
12
13#[cfg(reifydb_dst)]
14pub use dst::{ActorHandle, ActorSpawner, ActorSystem, JoinError};
15#[cfg(all(not(reifydb_single_threaded), not(reifydb_dst)))]
16pub use host::{ActorHandle, ActorSpawner, ActorSystem, JoinError};
17#[cfg(all(reifydb_single_threaded, not(reifydb_dst)))]
18pub use wasm::{ActorHandle, ActorSpawner, ActorSystem, JoinError};
19
20#[derive(Debug, Clone, Default)]
21pub struct ActorConfig {
22 pub mailbox_capacity: Option<usize>,
23 pub batch_size: Option<usize>,
24}
25
26impl ActorConfig {
27 pub fn new() -> Self {
28 Self::default()
29 }
30
31 pub fn mailbox_capacity(mut self, capacity: usize) -> Self {
32 self.mailbox_capacity = Some(capacity);
33 self
34 }
35
36 pub fn batch_size(mut self, size: usize) -> Self {
37 self.batch_size = Some(size);
38 self
39 }
40}