pub struct CodexProcess { /* private fields */ }Expand description
Initialized RPC client plus owned child lifecycle.
Implementations§
Source§impl CodexProcess
impl CodexProcess
Sourcepub async fn spawn(config: CodexProcessConfig) -> Result<Self, BridgeError>
pub async fn spawn(config: CodexProcessConfig) -> Result<Self, BridgeError>
Spawns codex app-server using inherited OAuth/config state.
Sourcepub async fn rpc(&self) -> Result<Arc<AppServerRpc>, BridgeError>
pub async fn rpc(&self) -> Result<Arc<AppServerRpc>, BridgeError>
Returns a healthy initialized connection, restarting a failed child once.
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
Current one-based child generation, useful for safe operational metrics.
Sourcepub async fn shutdown(&self) -> Result<(), BridgeError>
pub async fn shutdown(&self) -> Result<(), BridgeError>
Terminates and reaps the owned child process. Repeated calls are safe.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CodexProcess
impl !RefUnwindSafe for CodexProcess
impl !UnwindSafe for CodexProcess
impl Send for CodexProcess
impl Sync for CodexProcess
impl Unpin for CodexProcess
impl UnsafeUnpin for CodexProcess
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