pub struct Owned { /* private fields */ }Expand description
An owned WIT resource handle held by native code. Dropping it is the WIT drop. It is not
Clone. It closes its capability first and then releases its own admission claim.
Implementations§
Source§impl Owned
impl Owned
pub fn nominal(&self) -> &Nominal
Sourcepub fn revision(&self) -> Id
pub fn revision(&self) -> Id
Read the issuing provider revision retained through ownership transfers.
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 a method of this resource. The call is admitted on this handle’s own claim with
every ordinary kernel check. The handle travels only as the call’s implicit self loan.
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 Owned::call_portable, with control of the admitted invocation: see
crate::Reference::issue_portable.
Trait Implementations§
Source§impl FromPayload for Owned
impl FromPayload for Owned
Auto Trait Implementations§
impl !Freeze for Owned
impl !RefUnwindSafe for Owned
impl !Send for Owned
impl !Sync for Owned
impl !UnwindSafe for Owned
impl Forget for Owned
impl Move for Owned
impl Unpin for Owned
impl UnsafeUnpin for Owned
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