pub struct ResponsesApiProxyRequest {
pub api_key: String,
pub port: Option<u16>,
pub server_info_path: Option<PathBuf>,
pub http_shutdown: bool,
pub upstream_url: Option<String>,
}Expand description
Request for codex responses-api-proxy.
Fields§
§api_key: StringAPI key to write to stdin on startup.
port: Option<u16>Optional port to bind; falls back to an OS-assigned ephemeral port when omitted.
server_info_path: Option<PathBuf>Optional path passed to --server-info for {port,pid} JSON output.
http_shutdown: boolEnables the HTTP shutdown endpoint (GET /shutdown).
upstream_url: Option<String>Optional upstream URL passed to --upstream-url (defaults to https://api.openai.com/v1/responses).
Implementations§
Source§impl ResponsesApiProxyRequest
impl ResponsesApiProxyRequest
Sourcepub fn new(api_key: impl Into<String>) -> Self
pub fn new(api_key: impl Into<String>) -> Self
Creates a request with the API key provided via stdin.
Sourcepub fn server_info(self, path: impl Into<PathBuf>) -> Self
pub fn server_info(self, path: impl Into<PathBuf>) -> Self
Writes {port,pid} JSON to the provided path via --server-info.
Sourcepub fn http_shutdown(self, enable: bool) -> Self
pub fn http_shutdown(self, enable: bool) -> Self
Enables the --http-shutdown flag (GET /shutdown).
Sourcepub fn upstream_url(self, url: impl Into<String>) -> Self
pub fn upstream_url(self, url: impl Into<String>) -> Self
Overrides the upstream responses endpoint URL.
Trait Implementations§
Source§impl Clone for ResponsesApiProxyRequest
impl Clone for ResponsesApiProxyRequest
Source§fn clone(&self) -> ResponsesApiProxyRequest
fn clone(&self) -> ResponsesApiProxyRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ResponsesApiProxyRequest
impl Debug for ResponsesApiProxyRequest
Source§impl PartialEq for ResponsesApiProxyRequest
impl PartialEq for ResponsesApiProxyRequest
Source§fn eq(&self, other: &ResponsesApiProxyRequest) -> bool
fn eq(&self, other: &ResponsesApiProxyRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ResponsesApiProxyRequest
impl StructuralPartialEq for ResponsesApiProxyRequest
Auto Trait Implementations§
impl Freeze for ResponsesApiProxyRequest
impl RefUnwindSafe for ResponsesApiProxyRequest
impl Send for ResponsesApiProxyRequest
impl Sync for ResponsesApiProxyRequest
impl Unpin for ResponsesApiProxyRequest
impl UnsafeUnpin for ResponsesApiProxyRequest
impl UnwindSafe for ResponsesApiProxyRequest
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.