Struct telecomande::SimpleExecutor
source · [−]pub struct SimpleExecutor<P> where
P: Processor, { /* private fields */ }
Expand description
Simple implementation of crate::Executor
, process incomming crate::Command
s one by one.
Implementations
sourceimpl<P> SimpleExecutor<P> where
P: Processor,
impl<P> SimpleExecutor<P> where
P: Processor,
sourcepub fn new(processor: P) -> Self
pub fn new(processor: P) -> Self
Constructor, takes a crate::Processor
that will be used to handle incomming crate::Command
.
Trait Implementations
sourceimpl<P: Debug> Debug for SimpleExecutor<P> where
P: Processor,
impl<P: Debug> Debug for SimpleExecutor<P> where
P: Processor,
sourceimpl<P> Executor<P> for SimpleExecutor<P> where
P: Processor,
impl<P> Executor<P> for SimpleExecutor<P> where
P: Processor,
sourcefn run<'life0, 'async_trait>(
&'life0 mut self,
receiver: UnboundedReceiver<P::Command>
) -> Pin<Box<dyn Future<Output = Result<(), P::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 mut self,
receiver: UnboundedReceiver<P::Command>
) -> Pin<Box<dyn Future<Output = Result<(), P::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns if all crate::Remote
and the crate::Handle
have been dropped.
sourcefn spawn(self) -> Handle<P> where
Self: Sized,
fn spawn(self) -> Handle<P> where
Self: Sized,
Creates a tokio task in which an crate::Executor
listen for incoming crate::Command
.
Auto Trait Implementations
impl<P> RefUnwindSafe for SimpleExecutor<P> where
P: RefUnwindSafe,
impl<P> Send for SimpleExecutor<P>
impl<P> Sync for SimpleExecutor<P>
impl<P> Unpin for SimpleExecutor<P> where
P: Unpin,
impl<P> UnwindSafe for SimpleExecutor<P> where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more