pub struct RunnerConfig {
pub binary_path: PathBuf,
pub model: Option<String>,
pub timeout: Duration,
pub extra_args: Vec<String>,
pub allowed_env_keys: Vec<String>,
pub working_directory: Option<PathBuf>,
}Expand description
Configuration for a CLI runner instance
Fields§
§binary_path: PathBufPath to the CLI binary
model: Option<String>Model override (provider-specific format)
timeout: DurationMaximum time to wait for a CLI command to complete
extra_args: Vec<String>Additional CLI arguments appended to every invocation
allowed_env_keys: Vec<String>Environment variable keys passed through to the subprocess
working_directory: Option<PathBuf>Working directory for the subprocess
Implementations§
Source§impl RunnerConfig
impl RunnerConfig
Sourcepub fn new(binary_path: PathBuf) -> Self
pub fn new(binary_path: PathBuf) -> Self
Create a new runner configuration with the given binary path
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set the model to use
Sourcepub const fn with_timeout(self, timeout: Duration) -> Self
pub const fn with_timeout(self, timeout: Duration) -> Self
Set the command timeout
Sourcepub fn with_extra_args(self, args: Vec<String>) -> Self
pub fn with_extra_args(self, args: Vec<String>) -> Self
Set extra CLI arguments
Sourcepub fn with_allowed_env_keys(self, keys: Vec<String>) -> Self
pub fn with_allowed_env_keys(self, keys: Vec<String>) -> Self
Set the environment variable keys passed through to the subprocess
Sourcepub fn with_working_directory(self, dir: PathBuf) -> Self
pub fn with_working_directory(self, dir: PathBuf) -> Self
Set the working directory for the subprocess
Trait Implementations§
Source§impl Clone for RunnerConfig
impl Clone for RunnerConfig
Source§fn clone(&self) -> RunnerConfig
fn clone(&self) -> RunnerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RunnerConfig
impl RefUnwindSafe for RunnerConfig
impl Send for RunnerConfig
impl Sync for RunnerConfig
impl Unpin for RunnerConfig
impl UnsafeUnpin for RunnerConfig
impl UnwindSafe for RunnerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more