Trait telecomande::Processor
source · [−]pub trait Processor: Send + Sync + 'static {
type Command: Command;
type Error: Error;
fn handle<'life0, 'async_trait>(
&'life0 mut self,
command: Self::Command
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Represents the handling of crate::Command
in a task.
consumed by a crate::Executor
.
Required Associated Types
The type of crate::Command
to handle, sent by a crate::Remote
.
The Error
that may be thrown during the handling of a crate::Command
.
Required Methods
Method called on each received crate::Command
.
Values may be returned through the use of tokio::sync::oneshot
channels.
May need the #[telecomande::async_trait]
macro over the implementation block in order to satisfy the compiler.