reifydb_runtime/actor/system/
mod.rs1#[cfg(reifydb_target = "native")]
16pub mod native;
17
18#[cfg(reifydb_target = "wasm")]
19pub mod wasm;
20
21#[cfg(reifydb_target = "native")]
22pub use native::{ActorHandle, ActorSystem, ActorSystemConfig, JoinError};
23#[cfg(reifydb_target = "wasm")]
24pub use wasm::{ActorHandle, ActorSystem, ActorSystemConfig, JoinError};
25
26#[derive(Debug, Clone)]
27pub struct ActorConfig {
28 pub mailbox_capacity: Option<usize>,
29}
30
31impl Default for ActorConfig {
32 fn default() -> Self {
33 Self {
34 mailbox_capacity: None,
35 }
36 }
37}
38
39impl ActorConfig {
40 pub fn new() -> Self {
41 Self::default()
42 }
43
44 pub fn mailbox_capacity(mut self, capacity: usize) -> Self {
45 self.mailbox_capacity = Some(capacity);
46 self
47 }
48}