pub struct PluginScope { /* private fields */ }Expand description
A hierarchical lifecycle coordinator that never carries media data.
Implementations§
Source§impl PluginScope
impl PluginScope
pub fn kind(&self) -> PluginScopeKind
pub fn state(&self) -> PluginScopeState
pub fn failure_reason(&self) -> Option<String>
Sourcepub fn last_close_report(&self) -> Option<PluginScopeCloseReport>
pub fn last_close_report(&self) -> Option<PluginScopeCloseReport>
Returns the most recent bounded terminal settlement aggregate.
pub fn start(&self) -> Result<(), PluginScopeError>
pub fn create_child( &self, kind: PluginScopeKind, ) -> Result<PluginScope, PluginScopeError>
pub fn add_disposer<F>(&self, disposer: F) -> Result<(), PluginScopeError>
Sourcepub fn add_owner_disposer<F>(
&self,
disposer: F,
) -> Result<PluginOwnerToken, PluginScopeError>
pub fn add_owner_disposer<F>( &self, disposer: F, ) -> Result<PluginOwnerToken, PluginScopeError>
Registers one owner cleanup and returns its runtime-local quarantine token.
Sourcepub fn add_fallible_owner_disposer<F>(
&self,
disposer: F,
) -> Result<PluginOwnerToken, PluginScopeError>
pub fn add_fallible_owner_disposer<F>( &self, disposer: F, ) -> Result<PluginOwnerToken, PluginScopeError>
Registers one owner cleanup that can report a typed settlement failure.
pub fn fail( &self, reason: impl Into<String>, ) -> Result<PluginScopeCloseReport, PluginScopeError>
pub fn fail_with_timeout( &self, reason: impl Into<String>, timeout: Duration, ) -> Result<PluginScopeCloseReport, PluginScopeError>
pub fn cancel(&self) -> Result<PluginScopeCloseReport, PluginScopeError>
pub fn cancel_with_timeout( &self, timeout: Duration, ) -> Result<PluginScopeCloseReport, PluginScopeError>
pub fn close(&self) -> Result<PluginScopeCloseReport, PluginScopeError>
Sourcepub fn close_with_timeout(
&self,
timeout: Duration,
) -> Result<PluginScopeCloseReport, PluginScopeError>
pub fn close_with_timeout( &self, timeout: Duration, ) -> Result<PluginScopeCloseReport, PluginScopeError>
Closes the scope with one total deadline shared by descendants and owners.
Remaining time is divided across pending cleanup so one stalled owner
cannot consume every sibling’s budget. Concurrent draining work is
isolated as Quarantined; close retains the retryable Busy behavior.
Trait Implementations§
Source§impl Clone for PluginScope
impl Clone for PluginScope
Source§fn clone(&self) -> PluginScope
fn clone(&self) -> PluginScope
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 Freeze for PluginScope
impl RefUnwindSafe for PluginScope
impl Send for PluginScope
impl Sync for PluginScope
impl Unpin for PluginScope
impl UnsafeUnpin for PluginScope
impl UnwindSafe for PluginScope
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