CommandExecute

Trait CommandExecute 

Source
pub trait CommandExecute:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn command_execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        program: &'life1 str,
        args: &'life2 [&'life3 str],
    ) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
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§

Source

fn command_execute<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, program: &'life1 str, args: &'life2 [&'life3 str], ) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Execute a command with the given program and arguments.

Implementors§