pub struct Endpoint {
pub base_url: String,
pub api_key: String,
pub protocol: Protocol,
pub model: String,
pub anthropic_version: String,
pub timeout: Duration,
pub headers: Vec<(String, String)>,
}Fields§
§base_url: String§api_key: String§protocol: Protocol§model: String§anthropic_version: String§timeout: Duration§headers: Vec<(String, String)>Sent on every request, ahead of any per-probe extra_headers.
The CLI leaves this empty. An embedder uses it for whatever its own
front door requires — routing headers, a tenant id, a marker that says
which of its callers this run belongs to. It is deliberately not
merged into auth_headers’ omit logic: a probe that removes the API key
to see how the endpoint answers must still be routed to it.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn url(&self, path: &str) -> String
pub fn url(&self, path: &str) -> String
Join the base URL with a protocol path, inserting /v1 only when the
base does not already carry a version segment. Both
https://api.anthropic.com and https://relay.example/api/v1 are
common in the wild and must both resolve correctly.
pub fn host(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnsafeUnpin for Endpoint
impl UnwindSafe for Endpoint
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