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 ActoRuntimes 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§

Required Methods§

source

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.