Struct tokio_scoped::ScopedRuntime [−][src]
pub struct ScopedRuntime { /* fields omitted */ }
Wrapper type around a tokio Runtime which can be used to create Scope
s. This type takes
ownership of the Runtime. For an alternative approach that
See also the scope
function.
Methods
impl ScopedRuntime
[src]
impl ScopedRuntime
pub fn new(rt: Runtime) -> Self
[src]
pub fn new(rt: Runtime) -> Self
pub fn scope<'a, F, R>(&'a self, f: F) -> R where
F: FnOnce(&mut Scope<'a>) -> R,
[src]
pub fn scope<'a, F, R>(&'a self, f: F) -> R where
F: FnOnce(&mut Scope<'a>) -> R,
Creates a scope bound by the lifetime of self
that can be used to spawn scoped futures.
pub fn into_inner(self) -> Runtime
[src]
pub fn into_inner(self) -> Runtime
Consumes the ScopedRuntime
and returns the inner Runtime
variable.
Trait Implementations
impl Debug for ScopedRuntime
[src]
impl Debug for ScopedRuntime
Auto Trait Implementations
impl Send for ScopedRuntime
impl Send for ScopedRuntime
impl Sync for ScopedRuntime
impl Sync for ScopedRuntime