pub struct DeactivateContext { /* private fields */ }Expand description
Context supplied while a Plugin 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 Plugin Instance key.
Sourcepub const fn phase(&self) -> PluginLifecyclePhase
pub const fn phase(&self) -> PluginLifecyclePhase
Returns the phase represented by this context.
Sourcepub fn dependencies(&self) -> &PluginDependencies
pub fn dependencies(&self) -> &PluginDependencies
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 dependency_invocation_context(
&self,
) -> Result<InvocationContext, RuntimeFailure>
pub fn dependency_invocation_context( &self, ) -> Result<InvocationContext, RuntimeFailure>
Creates the scoped Invocation Context used for dependency calls during cleanup.
The context inherits the cleanup deadline and cancellation budget. Only a dependency handle can use its shutdown authority; App admission remains closed.
Sourcepub fn remaining_budget(&self) -> Option<Duration>
pub fn remaining_budget(&self) -> Option<Duration>
Returns the Host budget remaining for this cleanup phase.
Legacy authoring profiles that do not opt into bounded cleanup return
None.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more