pub struct ReadinessContext { /* private fields */ }Expand description
Context supplied after the App Ready Gate has opened.
Implementations§
Source§impl ReadinessContext
impl ReadinessContext
Sourcepub fn instance_key(&self) -> &str
pub fn instance_key(&self) -> &str
Returns the App-local Module Instance key.
Sourcepub const fn phase(&self) -> ModuleLifecyclePhase
pub const fn phase(&self) -> ModuleLifecyclePhase
Returns the phase represented by this context.
Sourcepub fn dependencies(&self) -> &ModuleDependencies
pub fn dependencies(&self) -> &ModuleDependencies
Returns the explicit dependencies selected for this Instance.
Sourcepub fn ready_gate(&self) -> AppReadyGate
pub fn ready_gate(&self) -> AppReadyGate
Returns the opened App Ready Gate.
Sourcepub fn wait(&self) -> LocalBoxFuture<'static, ()>
pub fn wait(&self) -> LocalBoxFuture<'static, ()>
Waits for the App Ready Gate to open.
Sourcepub fn tasks(&self) -> &ManagedTaskScope
pub fn tasks(&self) -> &ManagedTaskScope
Returns the generation-owned task scope.
Sourcepub fn resources(&self) -> &ManagedResourceScope
pub fn resources(&self) -> &ManagedResourceScope
Returns the generation-owned resource scope.
Sourcepub fn cancellation(&self) -> CancellationToken
pub fn cancellation(&self) -> CancellationToken
Returns the generation-owned cooperative cancellation token.
Sourcepub fn is_accepting(&self) -> bool
pub fn is_accepting(&self) -> bool
Returns whether new externally triggered work may be admitted.
Sourcepub fn admission(&self) -> AppAdmission
pub fn admission(&self) -> AppAdmission
Returns the App admission state.
Trait Implementations§
Source§impl Clone for ReadinessContext
impl Clone for ReadinessContext
Source§fn clone(&self) -> ReadinessContext
fn clone(&self) -> ReadinessContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ReadinessContext
impl !Send for ReadinessContext
impl !Sync for ReadinessContext
impl !UnwindSafe for ReadinessContext
impl Freeze for ReadinessContext
impl Unpin for ReadinessContext
impl UnsafeUnpin for ReadinessContext
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