Skip to main content

CommandExecute

Trait CommandExecute 

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, Error>> + MaybeSend + 'a;
}
Available on crate feature reqsign only.
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§

fn command_execute<'a>( &'a self, program: &'a str, args: &'a [&'a str], ) -> impl Future<Output = Result<CommandOutput, Error>> + 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".

Implementations on Foreign Types§

§

impl<T> CommandExecute for Arc<T>

§

async fn command_execute( &self, program: &str, args: &[&str], ) -> Result<CommandOutput, Error>

Implementors§