pub struct Handle { /* private fields */ }Expand description
Handle to the Runtime.
The handle is internally reference-counted and can be freely cloned.
A handle can be obtained using the Runtime::handle method.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn metrics(&self) -> RuntimeMetrics
pub fn metrics(&self) -> RuntimeMetrics
Returns a new RuntimeMetrics handle for this runtime.
Sourcepub fn current_services_metrics(&self) -> ServicesMetrics
pub fn current_services_metrics(&self) -> ServicesMetrics
Returns all service metrics of all currently running services.
Unlike Self::metrics, this is not a handle to the metrics.
Sourcepub fn service_set(&self) -> ServiceSet
pub fn service_set(&self) -> ServiceSet
Returns a new unique ServiceSet to spawn services and await their termination.
Trait Implementations§
Source§impl ServiceSpawn for Handle
impl ServiceSpawn for Handle
Source§fn start_obj(&self, service: ServiceObj)
fn start_obj(&self, service: ServiceObj)
Starts the service on the executor.
Auto Trait Implementations§
impl Freeze for Handle
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnsafeUnpin for Handle
impl UnwindSafe for Handle
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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