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§
Source§impl<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§
Source§impl<P> Debug for SimpleExecutor<P>
impl<P> Debug for SimpleExecutor<P>
Source§impl<P> Executor<P> for SimpleExecutor<P>where
P: Processor,
impl<P> Executor<P> for SimpleExecutor<P>where
P: Processor,
Source§fn run<'life0, 'async_trait>(
&'life0 mut self,
receiver: UnboundedReceiver<P::Command>,
) -> Pin<Box<dyn Future<Output = Result<(), P::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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
Self: 'async_trait,
'life0: 'async_trait,
Returns if all
crate::Remote
and the crate::Handle
have been dropped.Source§fn 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> Freeze for SimpleExecutor<P>where
P: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more