pub struct SpawnOpts { /* private fields */ }Expand description
Options with which an actor will be spawned.
It is possible to specify:
- the set of actor-ids the newly spawned actor will be immediately linked to;
- the sizes for msg-inbox and signal-inbox;
- exit-handler;
- a “bag” of arbitrary properties (identified by their types).
Implementations§
Source§impl SpawnOpts
impl SpawnOpts
Sourcepub fn with_msg_inbox_size(self, sz: usize) -> Self
pub fn with_msg_inbox_size(self, sz: usize) -> Self
specify the capacity limit for msg-inbox
Sourcepub fn msg_inbox_size(&self) -> usize
pub fn msg_inbox_size(&self) -> usize
the capacity limit for msg-inbox
Source§impl SpawnOpts
impl SpawnOpts
Sourcepub fn with_sig_inbox_size(self, sz: usize) -> Self
pub fn with_sig_inbox_size(self, sz: usize) -> Self
specify the capacity limit for signal-inbox
Sourcepub fn sig_inbox_size(&self) -> usize
pub fn sig_inbox_size(&self) -> usize
the capacity limit for signal-inbox
Source§impl SpawnOpts
impl SpawnOpts
Sourcepub fn with_exit_handler(self, exit_handler: Arc<dyn ExitHandler>) -> Self
pub fn with_exit_handler(self, exit_handler: Arc<dyn ExitHandler>) -> Self
Specify the exit-handler for the spawned actor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpawnOpts
impl !RefUnwindSafe for SpawnOpts
impl Send for SpawnOpts
impl Sync for SpawnOpts
impl Unpin for SpawnOpts
impl !UnwindSafe for SpawnOpts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more