Struct std::task::LocalTaskObj [−][src]
pub struct LocalTaskObj { /* fields omitted */ }🔬 This is a nightly-only experimental API. (futures_api #50547)
futures in libcore are unstable
A custom trait object for polling tasks, roughly akin to
Box<Future<Output = ()>>.
Contrary to TaskObj, LocalTaskObj does not have a Send bound.
Methods
impl LocalTaskObj[src]
impl LocalTaskObjpub fn new<T>(t: T) -> LocalTaskObj where
T: UnsafeTask, [src]
pub fn new<T>(t: T) -> LocalTaskObj where
T: UnsafeTask, 🔬 This is a nightly-only experimental API. (futures_api #50547)
futures in libcore are unstable
Create a LocalTaskObj from a custom trait object representation.
pub unsafe fn as_task_obj(self) -> TaskObj[src]
pub unsafe fn as_task_obj(self) -> TaskObj🔬 This is a nightly-only experimental API. (futures_api #50547)
futures in libcore are unstable
Converts the LocalTaskObj into a TaskObj
To make this operation safe one has to ensure that the UnsafeTask
instance from which this LocalTaskObj was created actually implements
Send.
Trait Implementations
impl Drop for LocalTaskObj[src]
impl Drop for LocalTaskObjimpl Future for LocalTaskObj[src]
impl Future for LocalTaskObjtype Output = ()
🔬 This is a nightly-only experimental API. (futures_api #50547)
futures in libcore are unstable
The result of the Future.
fn poll(self: PinMut<LocalTaskObj>, cx: &mut Context) -> Poll<()>[src]
fn poll(self: PinMut<LocalTaskObj>, cx: &mut Context) -> Poll<()>🔬 This is a nightly-only experimental API. (futures_api #50547)
futures in libcore are unstable
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
impl Debug for LocalTaskObj[src]
impl Debug for LocalTaskObjfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl From<TaskObj> for LocalTaskObj[src]
impl From<TaskObj> for LocalTaskObjfn from(task: TaskObj) -> LocalTaskObj[src]
fn from(task: TaskObj) -> LocalTaskObjPerforms the conversion.
impl<F> From<PinBox<F>> for LocalTaskObj where
F: 'static + Future<Output = ()>, [src]
impl<F> From<PinBox<F>> for LocalTaskObj where
F: 'static + Future<Output = ()>, fn from(boxed: PinBox<F>) -> LocalTaskObj[src]
fn from(boxed: PinBox<F>) -> LocalTaskObjPerforms the conversion.
impl<F> From<Box<F>> for LocalTaskObj where
F: 'static + Future<Output = ()>, [src]
impl<F> From<Box<F>> for LocalTaskObj where
F: 'static + Future<Output = ()>, fn from(boxed: Box<F>) -> LocalTaskObj[src]
fn from(boxed: Box<F>) -> LocalTaskObjPerforms the conversion.
Auto Trait Implementations
impl !Send for LocalTaskObj
impl !Send for LocalTaskObjimpl !Sync for LocalTaskObj
impl !Sync for LocalTaskObj