Struct core::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: UnsafeTask>(t: T) -> LocalTaskObj[src]
pub fn new<T: UnsafeTask>(t: T) -> LocalTaskObj🔬 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 Debug for LocalTaskObj[src]
impl Debug for LocalTaskObjfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats 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 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<Self>, cx: &mut Context) -> Poll<()>[src]
fn poll(self: PinMut<Self>, 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 Drop for LocalTaskObj[src]
impl Drop for LocalTaskObjAuto Trait Implementations
impl !Send for LocalTaskObj
impl !Send for LocalTaskObjimpl !Sync for LocalTaskObj
impl !Sync for LocalTaskObj