Skip to main content

ProviderRuntimeHandle

Struct ProviderRuntimeHandle 

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

Non-cloneable receive side for one exact provider binding.

Implementations§

Source§

impl ProviderRuntimeHandle

Source

pub fn provider_id(&self) -> &ToolProviderId

Source

pub fn binding_id(&self) -> ProviderBindingId

Source

pub fn effect_capacity(&self) -> usize

Maximum number of provider work items and unconsumed observation outcomes admitted by this exact binding.

Source

pub fn state(&self) -> ProviderRuntimeState

Source

pub fn completion_handle(&self) -> ProviderCompletionHandle

Source

pub fn cancellation_token(&self) -> ProviderCancellationToken

Source

pub fn try_recv(&self) -> Result<ProviderWork, TryRecvError>

Source

pub fn try_recv_observation_outcome( &self, ) -> Result<ProviderObservationOutcome, TryRecvError>

Source

pub fn begin_quiesce(&self) -> Result<(), ProviderRuntimeError>

Hides this binding from new local client dispatch while preserving its receive and completion lanes for already admitted work.

A supervisor must retain every native owner until physical exit and call ProviderRuntimeHandle::close only after teardown. Quiescing is a local admission fence; canonical detach still flows through the kernel.

Source

pub fn close(&self) -> Result<u64, ProviderRuntimeError>

Fences work immediately and non-blockingly requests canonical detach. A full ingress leaves the detach retryable in Closing state.

Source

pub fn try_complete( &self, invocation: &mut ProviderInvocation, observation: &CapabilityObservation, ) -> Result<u64, ProviderRuntimeError>

Source

pub fn try_succeed( &self, invocation: &mut ProviderInvocation, result: &CapabilityResult, ) -> Result<u64, ProviderRuntimeError>

Source

pub fn try_fail( &self, invocation: &mut ProviderInvocation, failure: &ToolFailure, ) -> Result<u64, ProviderRuntimeError>

Trait Implementations§

Source§

impl Drop for ProviderRuntimeHandle

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, 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, !>

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.