pub struct System { /* private fields */ }Expand description
A manager for a per-thread distributed async runtime.
Implementations§
Source§impl System
impl System
Sourcepub fn new() -> SystemRunner
pub fn new() -> SystemRunner
Sourcepub fn with_tokio_rt<F>(runtime_factory: F) -> SystemRunner
pub fn with_tokio_rt<F>(runtime_factory: F) -> SystemRunner
Create a new System using the Tokio Runtime returned from a closure.
Source§impl System
impl System
Sourcepub fn try_current() -> Option<System>
pub fn try_current() -> Option<System>
Try to get current running system.
Returns None if no System has been started.
Unlike current, this never panics.
Sourcepub fn arbiter(&self) -> &ArbiterHandle
pub fn arbiter(&self) -> &ArbiterHandle
Get handle to a the System’s initial Arbiter.
Sourcepub fn is_registered() -> bool
pub fn is_registered() -> bool
Check if there is a System registered on the current thread.
Sourcepub fn stop_with_code(&self, code: i32)
pub fn stop_with_code(&self, code: i32)
Stop the system with a given exit code.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for System
impl RefUnwindSafe for System
impl Send for System
impl Sync for System
impl Unpin for System
impl UnwindSafe for System
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more