pub struct FiberScope<'scope, 'env: 'scope> { /* private fields */ }Expand description
Lexical ownership for a bounded set of borrowed, non-Send stacks.
Implementations§
Source§impl<'scope, 'env> FiberScope<'scope, 'env>
impl<'scope, 'env> FiberScope<'scope, 'env>
Sourcepub fn spawn(
&'scope self,
stack: MappedStack,
entry: impl FnOnce() + 'scope,
) -> Result<FiberLease>
pub fn spawn( &'scope self, stack: MappedStack, entry: impl FnOnce() + 'scope, ) -> Result<FiberLease>
Creates a local stack. The scope retains ownership even if its lease is forgotten.
Auto Trait Implementations§
impl<'scope, 'env> !RefUnwindSafe for FiberScope<'scope, 'env>
impl<'scope, 'env> !Send for FiberScope<'scope, 'env>
impl<'scope, 'env> !Sync for FiberScope<'scope, 'env>
impl<'scope, 'env> !UnwindSafe for FiberScope<'scope, 'env>
impl<'scope, 'env> Forget for FiberScope<'scope, 'env>
impl<'scope, 'env> Freeze for FiberScope<'scope, 'env>
impl<'scope, 'env> Unpin for FiberScope<'scope, 'env>
impl<'scope, 'env> UnsafeUnpin for FiberScope<'scope, 'env>
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