pub struct Scope<'d> { /* private fields */ }Implementations§
Source§impl<'d> Scope<'d>
impl<'d> Scope<'d>
pub fn context(&mut self) -> Context<'_, 'd>
pub fn token(&mut self) -> &mut Token<'d>
Sourcepub fn with_turn<R>(
&mut self,
run: impl for<'scope> FnOnce(&'scope mut Token<'d>, Context<'scope, 'd>, Controller<'scope, 'd>) -> R,
) -> R
pub fn with_turn<R>( &mut self, run: impl for<'scope> FnOnce(&'scope mut Token<'d>, Context<'scope, 'd>, Controller<'scope, 'd>) -> R, ) -> R
Runs with the sole scheduler coordinator for this driver scope.
ⓘ
use dope_core::driver::{lifecycle::Scope, schedule::Controller};
fn escape<'d>(scope: &mut Scope<'d>) -> Controller<'static, 'd> {
scope.with_turn(|_, _, turn| turn)
}pub fn driver_ref(&self) -> Reference<'d>
Auto Trait Implementations§
impl<'d> !Freeze for Scope<'d>
impl<'d> !RefUnwindSafe for Scope<'d>
impl<'d> !Send for Scope<'d>
impl<'d> !Sync for Scope<'d>
impl<'d> !UnwindSafe for Scope<'d>
impl<'d> Unpin for Scope<'d>
impl<'d> UnsafeUnpin for Scope<'d>
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