pub struct XaiHttpPolicy;Expand description
xAI HTTP policy (Bearer; no OpenRouter attribution headers).
Trait Implementations§
Source§impl Clone for XaiHttpPolicy
impl Clone for XaiHttpPolicy
Source§fn clone(&self) -> XaiHttpPolicy
fn clone(&self) -> XaiHttpPolicy
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 moreimpl Copy for XaiHttpPolicy
Source§impl Debug for XaiHttpPolicy
impl Debug for XaiHttpPolicy
Source§impl Default for XaiHttpPolicy
impl Default for XaiHttpPolicy
Source§fn default() -> XaiHttpPolicy
fn default() -> XaiHttpPolicy
Returns the “default value” for a type. Read more
Source§impl ProviderHttpPolicy for XaiHttpPolicy
impl ProviderHttpPolicy for XaiHttpPolicy
Source§fn provider_id(&self) -> &'static str
fn provider_id(&self) -> &'static str
Stable provider id (
openrouter, openai, elevenlabs, xai).Source§fn official_origins(&self) -> &'static [&'static str]
fn official_origins(&self) -> &'static [&'static str]
Official HTTPS origins (scheme + host, no path), e.g.
https://openrouter.ai.Source§fn default_base_url(&self) -> &'static str
fn default_base_url(&self) -> &'static str
Default base URL used when the caller omits an explicit endpoint.
Source§fn auth_scheme(&self) -> AuthScheme
fn auth_scheme(&self) -> AuthScheme
Credential attachment scheme for this provider.
Source§fn allows_path(&self, path: &str) -> bool
fn allows_path(&self, path: &str) -> bool
Whether
path (relative to the validated base URL) is permitted. Read moreSource§fn apply_auth(&self, req: RequestBuilder, api_key: &str) -> RequestBuilder
fn apply_auth(&self, req: RequestBuilder, api_key: &str) -> RequestBuilder
Attach the API key using this policy’s auth scheme.
Source§fn apply_extra_headers(&self, req: RequestBuilder) -> RequestBuilder
fn apply_extra_headers(&self, req: RequestBuilder) -> RequestBuilder
Provider-specific headers (never cross-applied to other providers).
Source§fn is_official_origin(&self, scheme: &str, host: &str) -> bool
fn is_official_origin(&self, scheme: &str, host: &str) -> bool
True when
scheme/host match an official origin for this policy.Source§fn allows_custom_credentialed_endpoint(&self) -> bool
fn allows_custom_credentialed_endpoint(&self) -> bool
Whether an explicit custom HTTPS endpoint may receive credentials when
crate::remote::RemotePolicy::allow_custom_credentialed_endpoint is set.Source§fn custom_endpoint_hint(&self) -> String
fn custom_endpoint_hint(&self) -> String
Operator-facing hint when a credentialed origin is rejected.
Auto Trait Implementations§
impl Freeze for XaiHttpPolicy
impl RefUnwindSafe for XaiHttpPolicy
impl Send for XaiHttpPolicy
impl Sync for XaiHttpPolicy
impl Unpin for XaiHttpPolicy
impl UnsafeUnpin for XaiHttpPolicy
impl UnwindSafe for XaiHttpPolicy
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<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>
Converts
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>
Converts
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