Struct tokio_scoped::ScopeBuilder
source · [−]pub struct ScopeBuilder<'a> { /* private fields */ }
Expand description
Struct used to build scopes from a borrowed Handle
. Generally users should use the scoped
function instead of building ScopeBuilder
instances directly.
Implementations
sourceimpl<'a> ScopeBuilder<'a>
impl<'a> ScopeBuilder<'a>
pub fn from_runtime(rt: &'a Runtime) -> ScopeBuilder<'a>
pub fn scope<F, R>(&self, f: F) -> R where
F: FnOnce(&mut Scope<'a>) -> R,
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ScopeBuilder<'a>
impl<'a> Send for ScopeBuilder<'a>
impl<'a> Sync for ScopeBuilder<'a>
impl<'a> Unpin for ScopeBuilder<'a>
impl<'a> !UnwindSafe for ScopeBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more