pub struct GatewayOptions {
pub base_url: Option<String>,
pub router: Option<String>,
pub token_env: String,
pub standalone_web_search: Option<bool>,
}Expand description
An API gateway for one run (issue #65).
Exactly one of base_url (used as is) or router (a link-assistant/router
origin; the tool’s service path is appended), plus token_env, the
variable holding the token. Only the
variable name reaches the command line; the tool reads the value from its
environment, which always inherits token_env.
standalone_web_search says the gateway serves Codex’s standalone search
route (POST <base_url>/alpha/search, issue #74); None means true
with router (link-assistant/router serves it) and false with
base_url.
Fields§
§base_url: Option<String>§router: Option<String>§token_env: String§standalone_web_search: Option<bool>Implementations§
Source§impl GatewayOptions
impl GatewayOptions
Sourcepub fn with_base_url(
base_url: impl Into<String>,
token_env: impl Into<String>,
) -> Self
pub fn with_base_url( base_url: impl Into<String>, token_env: impl Into<String>, ) -> Self
A gateway reached at base_url as is.
Sourcepub fn with_router(
router: impl Into<String>,
token_env: impl Into<String>,
) -> Self
pub fn with_router( router: impl Into<String>, token_env: impl Into<String>, ) -> Self
A link-assistant/router origin; each tool appends its service path.
Sourcepub fn with_standalone_web_search(self, enabled: bool) -> Self
pub fn with_standalone_web_search(self, enabled: bool) -> Self
Declare whether the gateway serves Codex’s standalone search route.
Sourcepub fn serves_standalone_web_search(&self) -> bool
pub fn serves_standalone_web_search(&self) -> bool
Whether the gateway serves Codex’s standalone search route: the
explicit setting, else true for a router origin.
Trait Implementations§
Source§impl Clone for GatewayOptions
impl Clone for GatewayOptions
Source§impl Debug for GatewayOptions
impl Debug for GatewayOptions
Source§impl Default for GatewayOptions
impl Default for GatewayOptions
impl Eq for GatewayOptions
Source§impl PartialEq for GatewayOptions
impl PartialEq for GatewayOptions
impl StructuralPartialEq for GatewayOptions
Auto Trait Implementations§
impl Forget for GatewayOptions
impl Freeze for GatewayOptions
impl Move for GatewayOptions
impl RefUnwindSafe for GatewayOptions
impl Send for GatewayOptionswhere
RawVecInner: Send,
impl Sync for GatewayOptionswhere
RawVecInner: Sync,
impl Unpin for GatewayOptions
impl UnsafeUnpin for GatewayOptions
impl UnwindSafe for GatewayOptionswhere
RawVecInner: UnwindSafe,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.