pub struct Builder { /* private fields */ }Expand description
Builder struct for a ntex 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§
Source§impl Builder
impl Builder
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 stack_size(self, size: usize) -> Self
pub fn stack_size(self, size: usize) -> Self
Sets the size of the stack (in bytes) for the new thread.
Sourcepub fn ping_interval(self, interval: usize) -> Self
pub fn ping_interval(self, interval: usize) -> Self
Sets ping interval for spawned arbiters.
Interval is in milliseconds. By default 5000 milliseconds is set. To disable pings set value to zero.
Sourcepub fn finish(self) -> SystemRunner
pub fn finish(self) -> SystemRunner
Create new System.
This method panics if it can not create tokio runtime
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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