pub struct DeactivateContext { /* private fields */ }Expand description
Context supplied while a Module releases one generation.
Implementations§
Source§impl DeactivateContext
impl DeactivateContext
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 const fn reason(&self) -> DeactivationReason
pub const fn reason(&self) -> DeactivationReason
Returns why this generation is being deactivated.
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 admission(&self) -> AppAdmission
pub fn admission(&self) -> AppAdmission
Returns the App admission state, which is closed during deactivation.
Trait Implementations§
Source§impl Clone for DeactivateContext
impl Clone for DeactivateContext
Source§fn clone(&self) -> DeactivateContext
fn clone(&self) -> DeactivateContext
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 DeactivateContext
impl !Send for DeactivateContext
impl !Sync for DeactivateContext
impl !UnwindSafe for DeactivateContext
impl Freeze for DeactivateContext
impl Unpin for DeactivateContext
impl UnsafeUnpin for DeactivateContext
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