pub struct CommandExecutor<R, S> { /* private fields */ }Expand description
Command executor for synchronous commands.
Note: Task commands require async execution and return ExecutionResult::Pending.
Implementations§
Source§impl<R: Router, S: Storage> CommandExecutor<R, S>
impl<R: Router, S: Storage> CommandExecutor<R, S>
Sourcepub const fn new(config: ExecutorConfig<R, S>) -> Self
pub const fn new(config: ExecutorConfig<R, S>) -> Self
Create a new command executor.
Sourcepub fn execute<M: Send>(&self, command: Command<M>) -> ExecutionResult<M>
pub fn execute<M: Send>(&self, command: Command<M>) -> ExecutionResult<M>
Execute a command synchronously.
For async Task commands, this returns ExecutionResult::Pending.
Use execute_blocking to block on async tasks.
Auto Trait Implementations§
impl<R, S> Freeze for CommandExecutor<R, S>
impl<R, S> RefUnwindSafe for CommandExecutor<R, S>where
R: RefUnwindSafe,
S: RefUnwindSafe,
impl<R, S> Send for CommandExecutor<R, S>
impl<R, S> Sync for CommandExecutor<R, S>
impl<R, S> Unpin for CommandExecutor<R, S>
impl<R, S> UnwindSafe for CommandExecutor<R, S>where
R: RefUnwindSafe,
S: RefUnwindSafe,
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