pub struct PluginRuntime { /* private fields */ }Expand description
Runtime owner for one immutable plan and its root scope.
Implementations§
Source§impl PluginRuntime
impl PluginRuntime
Sourcepub fn attach_active_playback(
&self,
correlation: PluginActivePlaybackCorrelation,
) -> Result<PluginPlaybackAttachment, PluginPlaybackError>
pub fn attach_active_playback( &self, correlation: PluginActivePlaybackCorrelation, ) -> Result<PluginPlaybackAttachment, PluginPlaybackError>
Attaches the first active playback scope for this runtime.
Sourcepub fn attach_next_prewarm(
&self,
correlation: PluginNextPrewarmCorrelation,
) -> Result<PluginPlaybackAttachment, PluginPlaybackError>
pub fn attach_next_prewarm( &self, correlation: PluginNextPrewarmCorrelation, ) -> Result<PluginPlaybackAttachment, PluginPlaybackError>
Attaches the only allowed next-item prewarm scope.
Rejects active-only effects from prewarm or stale attachments.
Sourcepub fn promote_next_prewarm(
&self,
prewarm: &PluginPlaybackAttachment,
correlation: PluginActivePlaybackCorrelation,
timeout: Duration,
) -> Result<PluginPlaybackTransitionReport, PluginPlaybackError>
pub fn promote_next_prewarm( &self, prewarm: &PluginPlaybackAttachment, correlation: PluginActivePlaybackCorrelation, timeout: Duration, ) -> Result<PluginPlaybackTransitionReport, PluginPlaybackError>
Promotes the current next prewarm after an authoritative activation.
Sourcepub fn replace_active_playback(
&self,
correlation: PluginActivePlaybackCorrelation,
timeout: Duration,
) -> Result<PluginPlaybackTransitionReport, PluginPlaybackError>
pub fn replace_active_playback( &self, correlation: PluginActivePlaybackCorrelation, timeout: Duration, ) -> Result<PluginPlaybackTransitionReport, PluginPlaybackError>
Replaces active playback and settles any obsolete next prewarm first.
Sourcepub fn cancel_next_prewarm(
&self,
prewarm: &PluginPlaybackAttachment,
timeout: Duration,
) -> Result<PluginScopeCloseReport, PluginPlaybackError>
pub fn cancel_next_prewarm( &self, prewarm: &PluginPlaybackAttachment, timeout: Duration, ) -> Result<PluginScopeCloseReport, PluginPlaybackError>
Cancels the exact next prewarm attachment and rejects stale callers.
Source§impl PluginRuntime
impl PluginRuntime
pub fn new(plan: PluginPlan) -> Self
pub fn plan(&self) -> &PluginPlan
pub fn root_scope(&self) -> PluginScope
Sourcepub fn shutdown(
&self,
timeout: Duration,
) -> Result<PluginScopeCloseReport, PluginScopeError>
pub fn shutdown( &self, timeout: Duration, ) -> Result<PluginScopeCloseReport, PluginScopeError>
Closes the root with one total deadline shared by the complete scope tree.
An already draining root is marked Quarantined so shutdown never waits
on an unbounded concurrent close.
Trait Implementations§
Source§impl Drop for PluginRuntime
impl Drop for PluginRuntime
Auto Trait Implementations§
impl !Freeze for PluginRuntime
impl RefUnwindSafe for PluginRuntime
impl Send for PluginRuntime
impl Sync for PluginRuntime
impl Unpin for PluginRuntime
impl UnsafeUnpin for PluginRuntime
impl UnwindSafe for PluginRuntime
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