Trait gmt_dos_actors::framework::model::Task
source · pub trait Task: Check + Display + Send + Sync {
// Required methods
fn async_run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TaskError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn task<'async_trait>(
self: Box<Self>
) -> Pin<Box<dyn Future<Output = Result<(), TaskError>> + Send + 'async_trait>>
where Self: 'async_trait;
fn as_plain(&self) -> PlainActor;
// Provided method
fn spawn(self) -> JoinHandle<Result<(), TaskError>>
where Self: Sized + 'static { ... }
}Expand description
Interface for running model components
Required Methods§
sourcefn async_run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TaskError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn async_run<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TaskError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn task<'async_trait>(
self: Box<Self>
) -> Pin<Box<dyn Future<Output = Result<(), TaskError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn task<'async_trait>(
self: Box<Self>
) -> Pin<Box<dyn Future<Output = Result<(), TaskError>> + Send + 'async_trait>>where
Self: 'async_trait,
Run the actor loop