Trait acto::MailboxSize
source · pub trait MailboxSize: ActoRuntime {
type Output: ActoRuntime;
// Required method
fn with_mailbox_size(&self, mailbox_size: usize) -> Self::Output;
}
Expand description
This trait is implemented by ActoRuntime
s that allow customization of the mailbox size.
async fn actor(cell: ActoCell<String, impl MailboxSize>) {
let child: ActoRef<u8> = cell.rt()
.with_mailbox_size(10)
.spawn_actor("child", |_: ActoCell<_, _>| async {})
.me;
}
Required Associated Types§
type Output: ActoRuntime
Required Methods§
fn with_mailbox_size(&self, mailbox_size: usize) -> Self::Output
Object Safety§
This trait is not object safe.
Implementors§
source§impl MailboxSize for AcTokioRuntime
Available on crate feature tokio
only.
impl MailboxSize for AcTokioRuntime
Available on crate feature
tokio
only.