pub struct RootServiceContext { /* private fields */ }Expand description
The unique, non-cloneable lifecycle root owned by crate::RuntimeOwner.
The type has no public constructor and cannot be promoted from a child context. Composition roots only use it to derive the first named child.
Implementations§
Source§impl RootServiceContext
impl RootServiceContext
Sourcepub fn component(&self, scope: impl Into<ScopeId>) -> ChildServiceContext
pub fn component(&self, scope: impl Into<ScopeId>) -> ChildServiceContext
Creates a long-lived component context owned by this process root.
Dynamically supplied names must be validated with ScopeId::try_new
before they reach this boundary. Static literals may use the constrained
From<&'static str> conversion.
Sourcepub fn process_budget(&self) -> ResourceBudget
pub fn process_budget(&self) -> ResourceBudget
Returns the shared process resource-budget root.
Sourcepub fn resources(&self) -> &RuntimeResources
pub fn resources(&self) -> &RuntimeResources
Returns the process-wide runtime resource capabilities.
Sourcepub fn diagnostics_snapshot(&self) -> RuntimeDiagnosticsSnapshot
pub fn diagnostics_snapshot(&self) -> RuntimeDiagnosticsSnapshot
Returns the diagnostics snapshot.
Sourcepub fn diagnostics_view_v1(
&self,
component: RuntimeComponent,
) -> RuntimeDiagnosticsViewV1
pub fn diagnostics_view_v1( &self, component: RuntimeComponent, ) -> RuntimeDiagnosticsViewV1
Returns a bounded, sanitized diagnostics view for this service runtime.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RootServiceContext
impl !UnwindSafe for RootServiceContext
impl Freeze for RootServiceContext
impl Send for RootServiceContext
impl Sync for RootServiceContext
impl Unpin for RootServiceContext
impl UnsafeUnpin for RootServiceContext
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