pub struct CodexConfig {
pub cli_path: Option<PathBuf>,
pub env: HashMap<String, String>,
pub config_overrides: ConfigOverrides,
pub profile: Option<String>,
pub connect_timeout: Option<Duration>,
pub close_timeout: Option<Duration>,
pub version_check_timeout: Option<Duration>,
pub stderr_callback: Option<StderrCallback>,
}Expand description
Top-level configuration for the Codex SDK.
Fields§
§cli_path: Option<PathBuf>Path to the codex CLI binary. If None, auto-detected via discovery.
env: HashMap<String, String>Environment variables to pass to the Codex CLI process.
config_overrides: ConfigOverridesTOML config overrides.
profile: Option<String>Config profile name (passed via --profile).
connect_timeout: Option<Duration>Timeout for CLI process spawn + session init.
close_timeout: Option<Duration>Timeout for graceful shutdown.
version_check_timeout: Option<Duration>Timeout for codex --version check.
stderr_callback: Option<StderrCallback>Stderr callback — invoked with each line of stderr from the CLI.
Implementations§
Source§impl CodexConfig
impl CodexConfig
Sourcepub fn builder() -> CodexConfigBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> CodexConfigBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building CodexConfig.
On the builder, call .cli_path(...)(optional), .env(...)(optional), .config_overrides(...)(optional), .profile(...)(optional), .connect_timeout(...)(optional), .close_timeout(...)(optional), .version_check_timeout(...)(optional), .stderr_callback(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CodexConfig.
Trait Implementations§
Source§impl Clone for CodexConfig
impl Clone for CodexConfig
Source§fn clone(&self) -> CodexConfig
fn clone(&self) -> CodexConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodexConfig
impl Debug for CodexConfig
Auto Trait Implementations§
impl Freeze for CodexConfig
impl !RefUnwindSafe for CodexConfig
impl Send for CodexConfig
impl Sync for CodexConfig
impl Unpin for CodexConfig
impl UnsafeUnpin for CodexConfig
impl !UnwindSafe for CodexConfig
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
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>
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>
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