pub struct Builder { /* private fields */ }
Expand description
Builder struct for a actix runtime.
Either use Builder::build
to create a system and start actors.
Alternatively, use Builder::run
to start the tokio runtime and
run a function in its context.
Implementations
sourceimpl Builder
impl Builder
sourcepub fn clock(self, clock: Clock) -> Self
pub fn clock(self, clock: Clock) -> Self
Set the Clock instance that will be used by this System.
Defaults to the system clock.
sourcepub fn stop_on_panic(self, stop_on_panic: bool) -> Self
pub fn stop_on_panic(self, stop_on_panic: bool) -> Self
Sets the option ‘stop_on_panic’ which controls whether the System is stopped when an uncaught panic is thrown from a worker thread.
Defaults to false.
sourcepub fn build(self) -> SystemRunner
pub fn build(self) -> SystemRunner
Create new System.
This method panics if it can not create tokio runtime
Auto Trait Implementations
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more