pub struct Reference { /* private fields */ }Expand description
A claim is released on drop. A running callback has its own physical kernel pin.
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn state_snapshot(&self) -> Result<(Snapshot, Value)>
pub fn state_snapshot(&self) -> Result<(Snapshot, Value)>
Encode the provider’s current state through its portable boundary while this claim is live.
Sourcepub fn status(&self) -> Result<Status>
pub fn status(&self) -> Result<Status>
Read this claim’s lifecycle status, including deterministic release.
Sourcepub async fn ready(&self) -> Result<()>
pub async fn ready(&self) -> Result<()>
Waits for the kernel’s activation program, including every resource opener.
Sourcepub async fn call<A: 'static, R: 'static>(
&self,
context: &Context,
method: &str,
arguments: A,
) -> Result<R>
pub async fn call<A: 'static, R: 'static>( &self, context: &Context, method: &str, arguments: A, ) -> Result<R>
Execute a typed local Rust call without requiring portable value traits. Arguments and results move as Rust values; nothing is serialized.
Sourcepub async fn call_portable<A: IntoPayload + 'static, R: FromPayload + 'static>(
&self,
context: &Context,
method: &str,
arguments: A,
) -> Result<R>
pub async fn call_portable<A: IntoPayload + 'static, R: FromPayload + 'static>( &self, context: &Context, method: &str, arguments: A, ) -> Result<R>
Call the provider’s portable entrypoint, whatever language or isolation it has. JavaScript arguments use tuples or vectors to represent the method’s argument list. Results are decoded inside the managed call, so an owned capability that cannot be delivered is closed rather than leaked.
Sourcepub async fn issue_portable<A: IntoPayload + 'static, R: FromPayload + 'static>(
&self,
context: &Context,
method: &str,
arguments: A,
) -> Result<(IssuedCall, LocalBoxFuture<'static, Result<R>>)>
pub async fn issue_portable<A: IntoPayload + 'static, R: FromPayload + 'static>( &self, context: &Context, method: &str, arguments: A, ) -> Result<(IssuedCall, LocalBoxFuture<'static, Result<R>>)>
Like Reference::call_portable, but its caller keeps control of the admitted
invocation: once admitted, it receives the IssuedCall, which cancels exactly this call
and waits for its physical end, and the call’s result, which it may stop awaiting.