Struct GoogleAITokenAuth
pub struct GoogleAITokenAuth { /* private fields */ }Expand description
Google AI OAuth2 access token authentication.
The access token is included directly in the WebSocket URL.
Implementations§
§impl GoogleAITokenAuth
impl GoogleAITokenAuth
pub fn new(access_token: impl Into<String>) -> GoogleAITokenAuth
pub fn new(access_token: impl Into<String>) -> GoogleAITokenAuth
Create a new Google AI token auth provider with the given access token.
Trait Implementations§
§impl AuthProvider for GoogleAITokenAuth
impl AuthProvider for GoogleAITokenAuth
§fn ws_url(&self, _model: &GeminiModel) -> String
fn ws_url(&self, _model: &GeminiModel) -> String
Build the WebSocket URL for the given model.
§fn rest_url(
&self,
endpoint: ServiceEndpoint,
model: Option<&GeminiModel>,
) -> String
fn rest_url( &self, endpoint: ServiceEndpoint, model: Option<&GeminiModel>, ) -> String
Build a REST API URL for the given service endpoint and model. Read more
§fn auth_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
GoogleAITokenAuth: 'async_trait,
fn auth_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
GoogleAITokenAuth: 'async_trait,
HTTP headers for the WebSocket upgrade request (e.g., Bearer token).
§fn query_params(&self) -> Vec<(String, String)>
fn query_params(&self) -> Vec<(String, String)>
Query parameters to append to the URL (e.g., API key).
Auto Trait Implementations§
impl Freeze for GoogleAITokenAuth
impl RefUnwindSafe for GoogleAITokenAuth
impl Send for GoogleAITokenAuth
impl Sync for GoogleAITokenAuth
impl Unpin for GoogleAITokenAuth
impl UnwindSafe for GoogleAITokenAuth
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