Skip to main content

Module execution

Module execution 

Source
Expand description

Command execution engine.

This module provides command execution capabilities:

  • Synchronous and asynchronous execution
  • Timeout handling
  • Streaming output

§Example

use shell_tunnel::execution::{Command, execute_simple};

// Simple one-shot execution
let result = execute_simple("echo hello").unwrap();
println!("Output: {}", result.text_output);

// Command with options
use std::time::Duration;
let cmd = Command::new("cargo build")
    .timeout(Duration::from_secs(60))
    .capture_output(true);

Structs§

Command
A command to be executed in a shell session.
CommandBuilder
Builder for creating commands with fluent API.
CommandExecutor
Command executor for running commands in shell sessions.
ExecutionResult
Result of command execution.
OutputChunk
Streaming output chunk from execution.

Enums§

OutputSource
Source of output data.

Constants§

DEFAULT_TIMEOUT
Default execution timeout.

Functions§

execute_simple
Simple one-shot command execution.
execute_with_timeout
Execute a command with timeout.