pub struct ApiKeyAuth { /* private fields */ }Expand description
API key authentication (Bearer token).
Implementations§
Source§impl ApiKeyAuth
impl ApiKeyAuth
Sourcepub fn with_site_url(self, url: impl Into<String>) -> Self
pub fn with_site_url(self, url: impl Into<String>) -> Self
Set the site URL (sent as HTTP-Referer header). This helps OpenRouter track usage and may unlock higher rate limits.
Sourcepub fn with_site_name(self, name: impl Into<String>) -> Self
pub fn with_site_name(self, name: impl Into<String>) -> Self
Set the site name (sent as X-Title header). This is displayed in OpenRouter’s dashboard.
Trait Implementations§
Source§impl AuthStrategy for ApiKeyAuth
impl AuthStrategy for ApiKeyAuth
Source§impl Clone for ApiKeyAuth
impl Clone for ApiKeyAuth
Source§fn clone(&self) -> ApiKeyAuth
fn clone(&self) -> ApiKeyAuth
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ApiKeyAuth
impl RefUnwindSafe for ApiKeyAuth
impl Send for ApiKeyAuth
impl Sync for ApiKeyAuth
impl Unpin for ApiKeyAuth
impl UnwindSafe for ApiKeyAuth
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