Struct ResourceScope
pub struct ResourceScope { /* private fields */ }Expand description
Activates a call’s codec, including guest-to-host-to-guest callbacks. Dropping scopes out of order unlinks them: a retained inner guard cannot revive an expired outer codec. Slots are reused, so steady-state calls allocate no scope bookkeeping.
Implementations§
§impl ResourceScope
impl ResourceScope
pub fn new(codec: Rc<dyn ResourceCodec>) -> ResourceScope
pub fn token(&self) -> ScopeToken
pub fn token(&self) -> ScopeToken
A non-owning token for this scope. Copying it cannot extend the scope’s lifetime.
Trait Implementations§
§impl Drop for ResourceScope
impl Drop for ResourceScope
Auto Trait Implementations§
impl !Send for ResourceScope
impl !Sync for ResourceScope
impl Freeze for ResourceScope
impl RefUnwindSafe for ResourceScope
impl Unpin for ResourceScope
impl UnsafeUnpin for ResourceScope
impl UnwindSafe for ResourceScope
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