pub struct Props<A: Actor> {
pub dispatcher: Option<String>,
pub mailbox: Option<String>,
pub deploy: Deploy,
pub supervisor_strategy: Option<SupervisorStrategy>,
/* private fields */
}Expand description
Typed props. The factory produces fresh A instances on initial start
and on restart.
Fields§
§dispatcher: Option<String>§mailbox: Option<String>§deploy: Deploy§supervisor_strategy: Option<SupervisorStrategy>Implementations§
Source§impl<A: Actor> Props<A>
impl<A: Actor> Props<A>
Sourcepub fn create<F>(factory: F) -> Self
pub fn create<F>(factory: F) -> Self
Create props from a zero-argument factory. Mirrors Props.Create<T>(() => new T()).
pub fn with_dispatcher(self, d: impl Into<String>) -> Self
pub fn with_mailbox(self, m: impl Into<String>) -> Self
pub fn with_supervisor_strategy(self, s: SupervisorStrategy) -> Self
pub fn with_deploy(self, d: Deploy) -> Self
pub fn new_actor(&self) -> A
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Props<A>
impl<A> !RefUnwindSafe for Props<A>
impl<A> Send for Props<A>
impl<A> Sync for Props<A>
impl<A> Unpin for Props<A>
impl<A> UnsafeUnpin for Props<A>
impl<A> !UnwindSafe for Props<A>
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