pub struct PrepareContext { /* private fields */ }Expand description
Context supplied while a Module reserves reversible resources.
Implementations§
Source§impl PrepareContext
impl PrepareContext
Sourcepub fn instance_key(&self) -> &str
pub fn instance_key(&self) -> &str
Returns the App-local Module Instance key.
Sourcepub fn entrypoint(&self) -> &str
pub fn entrypoint(&self) -> &str
Returns the exact package entrypoint selected by the immutable Plan.
Sourcepub fn configuration(&self) -> &str
pub fn configuration(&self) -> &str
Returns opaque Module-owned configuration selected by the immutable Plan.
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 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 remains closed until readiness.
Trait Implementations§
Source§impl Clone for PrepareContext
impl Clone for PrepareContext
Source§fn clone(&self) -> PrepareContext
fn clone(&self) -> PrepareContext
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 PrepareContext
impl !Send for PrepareContext
impl !Sync for PrepareContext
impl !UnwindSafe for PrepareContext
impl Freeze for PrepareContext
impl Unpin for PrepareContext
impl UnsafeUnpin for PrepareContext
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