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 Forget for RootServiceContext
impl Freeze for RootServiceContextwhere
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<TaskGroupInner> is !null: Freeze,
PhantomData<ArcInner<TaskGroupInner>>: Freeze,
*const ArcInner<Handle> is !null: Freeze,
PhantomData<ArcInner<Handle>>: Freeze,
*const ArcInner<Handle> is !null: Freeze,
PhantomData<ArcInner<Handle>>: Freeze,
*const ArcInner<BlockingPoolPolicy> is !null: Freeze,
PhantomData<ArcInner<BlockingPoolPolicy>>: Freeze,
*const ArcInner<GlobalBlockingBudgetInner> is !null: Freeze,
PhantomData<ArcInner<GlobalBlockingBudgetInner>>: Freeze,
*const ArcInner<Semaphore> is !null: Freeze,
PhantomData<ArcInner<Semaphore>>: Freeze,
*const ArcInner<DashMap<BlockingTaskId, BlockingTaskMeta>> is !null: Freeze,
PhantomData<ArcInner<DashMap<BlockingTaskId, BlockingTaskMeta>>>: Freeze,
*const ArcInner<Atomic<u64>> is !null: Freeze,
PhantomData<ArcInner<Atomic<u64>>>: Freeze,
*const ArcInner<DrainLeaseState> is !null: Freeze,
PhantomData<ArcInner<DrainLeaseState>>: Freeze,
*const ArcInner<IsolatedLifecycle> is !null: Freeze,
PhantomData<ArcInner<IsolatedLifecycle>>: Freeze,
*const ArcInner<BudgetNode> is !null: Freeze,
PhantomData<ArcInner<BudgetNode>>: Freeze,
*const ArcInner<[Arc<BudgetNode>]> is !null: Freeze,
PhantomData<ArcInner<[Arc<BudgetNode>]>>: Freeze,
*const ArcInner<CapacitySignal> is !null: Freeze,
PhantomData<ArcInner<CapacitySignal>>: Freeze,
*const ArcInner<DynamicKeyRegistryInner> is !null: Freeze,
PhantomData<ArcInner<DynamicKeyRegistryInner>>: Freeze,
*const ArcInner<[Arc<AdmissionGate>]> is !null: Freeze,
PhantomData<ArcInner<[Arc<AdmissionGate>]>>: Freeze,
*const ArcInner<RegistryInner> is !null: Freeze,
PhantomData<ArcInner<RegistryInner>>: Freeze,
impl Move for RootServiceContext
impl Send for RootServiceContextwhere
Arc<str>: Send,
Arc<TaskGroupInner>: Send,
Arc<Handle>: Send,
Arc<Handle>: Send,
Arc<BlockingPoolPolicy>: Send,
Arc<GlobalBlockingBudgetInner>: Send,
Arc<Semaphore>: Send,
Arc<DashMap<BlockingTaskId, BlockingTaskMeta>>: Send,
Arc<Atomic<u64>>: Send,
Arc<DrainLeaseState>: Send,
Arc<IsolatedLifecycle>: Send,
Arc<BudgetNode>: Send,
Arc<[Arc<BudgetNode>]>: Send,
Arc<CapacitySignal>: Send,
Arc<DynamicKeyRegistryInner>: Send,
Arc<[Arc<AdmissionGate>]>: Send,
Arc<RegistryInner>: Send,
impl Sync for RootServiceContextwhere
Arc<str>: Sync,
Arc<TaskGroupInner>: Sync,
Arc<Handle>: Sync,
Arc<Handle>: Sync,
Arc<BlockingPoolPolicy>: Sync,
Arc<GlobalBlockingBudgetInner>: Sync,
Arc<Semaphore>: Sync,
Arc<DashMap<BlockingTaskId, BlockingTaskMeta>>: Sync,
Arc<Atomic<u64>>: Sync,
Arc<DrainLeaseState>: Sync,
Arc<IsolatedLifecycle>: Sync,
Arc<BudgetNode>: Sync,
Arc<[Arc<BudgetNode>]>: Sync,
Arc<CapacitySignal>: Sync,
Arc<DynamicKeyRegistryInner>: Sync,
Arc<[Arc<AdmissionGate>]>: Sync,
Arc<RegistryInner>: Sync,
impl Unpin for RootServiceContextwhere
Arc<str>: Unpin,
Arc<TaskGroupInner>: Unpin,
Arc<Handle>: Unpin,
Arc<Handle>: Unpin,
Arc<BlockingPoolPolicy>: Unpin,
Arc<GlobalBlockingBudgetInner>: Unpin,
Arc<Semaphore>: Unpin,
Arc<DashMap<BlockingTaskId, BlockingTaskMeta>>: Unpin,
Arc<Atomic<u64>>: Unpin,
Arc<DrainLeaseState>: Unpin,
Arc<IsolatedLifecycle>: Unpin,
Arc<BudgetNode>: Unpin,
Arc<[Arc<BudgetNode>]>: Unpin,
Arc<CapacitySignal>: Unpin,
Arc<DynamicKeyRegistryInner>: Unpin,
Arc<[Arc<AdmissionGate>]>: Unpin,
Arc<RegistryInner>: Unpin,
impl UnsafeUnpin for RootServiceContextwhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<TaskGroupInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<TaskGroupInner>>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<Handle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Handle>>: UnsafeUnpin,
*const ArcInner<BlockingPoolPolicy> is !null: UnsafeUnpin,
PhantomData<ArcInner<BlockingPoolPolicy>>: UnsafeUnpin,
*const ArcInner<GlobalBlockingBudgetInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<GlobalBlockingBudgetInner>>: UnsafeUnpin,
*const ArcInner<Semaphore> is !null: UnsafeUnpin,
PhantomData<ArcInner<Semaphore>>: UnsafeUnpin,
*const ArcInner<DashMap<BlockingTaskId, BlockingTaskMeta>> is !null: UnsafeUnpin,
PhantomData<ArcInner<DashMap<BlockingTaskId, BlockingTaskMeta>>>: UnsafeUnpin,
*const ArcInner<Atomic<u64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u64>>>: UnsafeUnpin,
*const ArcInner<DrainLeaseState> is !null: UnsafeUnpin,
PhantomData<ArcInner<DrainLeaseState>>: UnsafeUnpin,
*const ArcInner<IsolatedLifecycle> is !null: UnsafeUnpin,
PhantomData<ArcInner<IsolatedLifecycle>>: UnsafeUnpin,
*const ArcInner<BudgetNode> is !null: UnsafeUnpin,
PhantomData<ArcInner<BudgetNode>>: UnsafeUnpin,
*const ArcInner<[Arc<BudgetNode>]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[Arc<BudgetNode>]>>: UnsafeUnpin,
*const ArcInner<CapacitySignal> is !null: UnsafeUnpin,
PhantomData<ArcInner<CapacitySignal>>: UnsafeUnpin,
*const ArcInner<DynamicKeyRegistryInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<DynamicKeyRegistryInner>>: UnsafeUnpin,
*const ArcInner<[Arc<AdmissionGate>]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[Arc<AdmissionGate>]>>: UnsafeUnpin,
*const ArcInner<RegistryInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<RegistryInner>>: UnsafeUnpin,
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