Skip to main content

PluginRuntime

Struct PluginRuntime 

Source
pub struct PluginRuntime { /* private fields */ }
Expand description

Runtime owner for one immutable plan and its root scope.

Implementations§

Source§

impl PluginRuntime

Source

pub fn attach_active_playback( &self, correlation: PluginActivePlaybackCorrelation, ) -> Result<PluginPlaybackAttachment, PluginPlaybackError>

Attaches the first active playback scope for this runtime.

Source

pub fn attach_next_prewarm( &self, correlation: PluginNextPrewarmCorrelation, ) -> Result<PluginPlaybackAttachment, PluginPlaybackError>

Attaches the only allowed next-item prewarm scope.

Source

pub fn authorize_playback_authority( &self, attachment: &PluginPlaybackAttachment, authority: PluginPlaybackAuthority, ) -> Result<(), PluginPlaybackError>

Rejects active-only effects from prewarm or stale attachments.

Source

pub fn promote_next_prewarm( &self, prewarm: &PluginPlaybackAttachment, correlation: PluginActivePlaybackCorrelation, timeout: Duration, ) -> Result<PluginPlaybackTransitionReport, PluginPlaybackError>

Promotes the current next prewarm after an authoritative activation.

Source

pub fn replace_active_playback( &self, correlation: PluginActivePlaybackCorrelation, timeout: Duration, ) -> Result<PluginPlaybackTransitionReport, PluginPlaybackError>

Replaces active playback and settles any obsolete next prewarm first.

Source

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

Source

pub fn new(plan: PluginPlan) -> Self

Source

pub fn plan(&self) -> &PluginPlan

Source

pub fn root_scope(&self) -> PluginScope

Source

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

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.