pub struct ResourceGateHandle { /* private fields */ }Expand description
A VM-thread capability for one runtime resource gate.
Native checkout paths use ResourceGateHandle::id with the ordinary
WaitKind::ResourceSlot / RuntimeRequest protocol. The close capability
exists for lifecycle edges that cannot first store the id (allocation
delivery cancelled) and host-only cleanup that runs outside a native
continuation. Clones share the close-once state.
Implementations§
Source§impl ResourceGateHandle
impl ResourceGateHandle
pub fn id(&self) -> ResourceGateId
Sourcepub fn close(&self) -> Result<bool, ResourceGateCloseError>
pub fn close(&self) -> Result<bool, ResourceGateCloseError>
Close the gate through its owning runtime. Returns Ok(true) when this
call removed the live gate, Ok(false) when it was already closed, and
leaves the capability retryable when runtime coordination fails.
Trait Implementations§
Source§impl Clone for ResourceGateHandle
impl Clone for ResourceGateHandle
Source§fn clone(&self) -> ResourceGateHandle
fn clone(&self) -> ResourceGateHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceGateHandle
impl Debug for ResourceGateHandle
Auto Trait Implementations§
impl !RefUnwindSafe for ResourceGateHandle
impl !Send for ResourceGateHandle
impl !Sync for ResourceGateHandle
impl !UnwindSafe for ResourceGateHandle
impl Freeze for ResourceGateHandle
impl Unpin for ResourceGateHandle
impl UnsafeUnpin for ResourceGateHandle
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