Struct caffe2_operator::AsyncTaskFuture
source · pub struct AsyncTaskFuture { /* private fields */ }
Expand description
| Represents the state of AsyncTask execution, | that can be queried with | | IsCompleted/IsFailed. Callbacks | are supported through SetCallback | and are called upon future’s completion. |
Implementations§
source§impl AsyncTaskFuture
impl AsyncTaskFuture
pub fn is_completed(&self) -> bool
pub fn is_failed(&self) -> bool
pub fn error_message(&self) -> String
pub fn wait(&self)
pub fn set_callback( &mut self, callback: fn(_u0: *const AsyncTaskFuture) -> c_void )
pub fn set_completed(&mut self, err_msg: Option<&str>)
sourcepub fn reset_state(&mut self)
pub fn reset_state(&mut self)
| ResetState is called on a completed | future, does not reset callbacks to | keep task graph structure |
Trait Implementations§
source§impl Default for AsyncTaskFuture
impl Default for AsyncTaskFuture
source§impl From<&Vec<*mut AsyncTaskFuture, Global>> for AsyncTaskFuture
impl From<&Vec<*mut AsyncTaskFuture, Global>> for AsyncTaskFuture
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncTaskFuture
impl Send for AsyncTaskFuture
impl Sync for AsyncTaskFuture
impl Unpin for AsyncTaskFuture
impl UnwindSafe for AsyncTaskFuture
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.