pub trait FutureInheritTaskLocal: Future + Sized {
// Required method
fn inherit_task_local(
self,
) -> TaskLocalFuture<TaskLocalInheritableTable, Self>;
}
Expand description
Required Methods§
Sourcefn inherit_task_local(self) -> TaskLocalFuture<TaskLocalInheritableTable, Self>
fn inherit_task_local(self) -> TaskLocalFuture<TaskLocalInheritableTable, Self>
Copies references to the inheritable task local values that are currently available into this Future
. These
copied references will be available after the Future
has been spawned onto a tokio
runtime.
§Example
use tokio_inherit_task_local::FutureInheritTaskLocal as _;
tokio::spawn(a_future.inherit_task_local());
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.