pub trait CommandExecute:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn command_execute<'a>(
&'a self,
program: &'a str,
args: &'a [&'a str],
) -> impl Future<Output = Result<CommandOutput>> + MaybeSend + 'a;
}Expand description
CommandExecute is used to execute external commands for credential retrieval.
This trait abstracts command execution to support different runtime environments:
- Tokio-based async execution
- Blocking execution for non-async contexts
- WebAssembly environments (returning errors)
- Mock implementations for testing
Required Methods§
Sourcefn command_execute<'a>(
&'a self,
program: &'a str,
args: &'a [&'a str],
) -> impl Future<Output = Result<CommandOutput>> + MaybeSend + 'a
fn command_execute<'a>( &'a self, program: &'a str, args: &'a [&'a str], ) -> impl Future<Output = Result<CommandOutput>> + MaybeSend + 'a
Execute a command with the given program and arguments.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".