pub struct ExecOptions {
pub model: Option<String>,
pub sandbox: Option<SandboxMode>,
pub approval: Option<ApprovalPolicy>,
pub full_auto: bool,
pub profile: Option<String>,
pub config_overrides: Vec<(String, String)>,
pub working_dir: Option<PathBuf>,
pub ephemeral: bool,
pub output_schema: Option<String>,
pub images: Vec<PathBuf>,
pub env_vars: Vec<(String, String)>,
}Expand description
Options for codex exec.
These map onto codex CLI flags. Only fields that are set will produce
flags; None / empty-vec fields are omitted.
Fields§
§model: Option<String>Model to use (e.g. "o4-mini", "codex-mini").
sandbox: Option<SandboxMode>Sandbox mode controlling file system access.
approval: Option<ApprovalPolicy>Approval policy for tool execution.
full_auto: boolEnable fully autonomous mode (auto-approve everything).
profile: Option<String>Named profile to load.
config_overrides: Vec<(String, String)>Config key=value overrides (passed as -c key=value).
working_dir: Option<PathBuf>Working directory for the execution.
ephemeral: boolRun in ephemeral mode (no session persistence).
output_schema: Option<String>JSON schema for structured output validation.
images: Vec<PathBuf>Image file paths to include as context.
env_vars: Vec<(String, String)>Additional environment variables to set.
Implementations§
Source§impl ExecOptions
impl ExecOptions
Sourcepub fn to_cli_args(&self) -> Vec<String>
pub fn to_cli_args(&self) -> Vec<String>
Convert these options into CLI arguments for the codex binary.
This does not include exec or --json — those are added by
ReadOnlyTransport::spawn.
Trait Implementations§
Source§impl Clone for ExecOptions
impl Clone for ExecOptions
Source§fn clone(&self) -> ExecOptions
fn clone(&self) -> ExecOptions
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 moreSource§impl Debug for ExecOptions
impl Debug for ExecOptions
Source§impl Default for ExecOptions
impl Default for ExecOptions
Source§fn default() -> ExecOptions
fn default() -> ExecOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecOptions
impl RefUnwindSafe for ExecOptions
impl Send for ExecOptions
impl Sync for ExecOptions
impl Unpin for ExecOptions
impl UnsafeUnpin for ExecOptions
impl UnwindSafe for ExecOptions
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