Trait pg_embed::command_executor::AsyncCommand [−][src]
pub trait AsyncCommand<S, E, P> where
E: Error + Send,
P: ProcessStatus<S, E> + Send,
Self: Sized, { fn new<A, B>(
executable_path: &OsStr,
args: A,
process_type: P
) -> Result<Self, E>
where
A: IntoIterator<Item = B>,
B: AsRef<OsStr>; fn execute<'life0, 'async_trait>(
&'life0 mut self,
timeout: Option<Duration>
) -> Pin<Box<dyn Future<Output = Result<S, E>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; }
Expand description
Async command trait
Required methods
Create a new async command
Execute command
When timeout is Some(duration) the process execution will be timed out after duration, if set to None the process execution will not be timed out.
Implementors
impl<S, E, P> AsyncCommand<S, E, P> for AsyncCommandExecutor<S, E, P> where
S: Send,
E: Error + Send,
P: ProcessStatus<S, E> + Send,