pub struct FiberLease(/* private fields */);Expand description
An internal carrier-local lease; scope exit revokes its executable stack.
Implementations§
Source§impl FiberLease
impl FiberLease
Sourcepub fn resume(&self) -> Option<FiberState>
pub fn resume(&self) -> Option<FiberState>
Resumes a ready stack. Reclaimed leases return None; reentrant resumes panic.
Sourcepub fn resume_with(&self, resume: Resume) -> Option<FiberState>
pub fn resume_with(&self, resume: Resume) -> Option<FiberState>
Resumes a ready stack and delivers a decision to its last suspension point.
Sourcepub fn take_stack(&self) -> Option<MappedStack>
pub fn take_stack(&self) -> Option<MappedStack>
Takes a completed stack. Every other phase retains ownership and returns None.
Sourcepub fn reclaim(&self)
pub fn reclaim(&self)
Reclaims a ready/completed stack. Failed mount setup leaves ownership intact. A running or already reclaiming stack cannot be reclaimed reentrantly.
Sourcepub fn live(&self) -> bool
pub fn live(&self) -> bool
Whether the scope retains this fiber, including while it is executing.
Sourcepub fn cleanup_context(&self, mount: impl Fn() -> Box<dyn Any> + 'static)
pub fn cleanup_context(&self, mount: impl Fn() -> Box<dyn Any> + 'static)
Installs the runtime’s cleanup mount. Mutating an executing lease panics.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FiberLease
impl !Send for FiberLease
impl !Sync for FiberLease
impl !UnwindSafe for FiberLease
impl Forget for FiberLease
impl Freeze for FiberLease
impl Unpin for FiberLease
impl UnsafeUnpin for FiberLease
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