pub struct ObjectiveAiClient {
pub client: Arc<HttpClient>,
}Expand description
Authentication client that delegates to the ObjectiveAI HTTP API.
Fields§
§client: Arc<HttpClient>The underlying HTTP client for ObjectiveAI API requests.
Implementations§
Source§impl ObjectiveAiClient
impl ObjectiveAiClient
Sourcepub fn new(client: Arc<HttpClient>) -> Self
pub fn new(client: Arc<HttpClient>) -> Self
Creates a new ObjectiveAI authentication client.
Trait Implementations§
Source§impl<CTXEXT> Client<CTXEXT> for ObjectiveAiClient
impl<CTXEXT> Client<CTXEXT> for ObjectiveAiClient
Source§fn create_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
request: CreateApiKeyRequest,
) -> Pin<Box<dyn Future<Output = Result<CreateApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
request: CreateApiKeyRequest,
) -> Pin<Box<dyn Future<Output = Result<CreateApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new API key for the authenticated user.
Source§fn create_openrouter_byok_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
request: CreateOpenRouterByokApiKeyRequest,
) -> Pin<Box<dyn Future<Output = Result<CreateOpenRouterByokApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_openrouter_byok_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
request: CreateOpenRouterByokApiKeyRequest,
) -> Pin<Box<dyn Future<Output = Result<CreateOpenRouterByokApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sets the user’s BYOK (Bring Your Own Key) OpenRouter API key.
Source§fn disable_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
request: DisableApiKeyRequest,
) -> Pin<Box<dyn Future<Output = Result<DisableApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disable_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
request: DisableApiKeyRequest,
) -> Pin<Box<dyn Future<Output = Result<DisableApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disables an existing API key.
Source§fn delete_openrouter_byok_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<(), ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_openrouter_byok_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<(), ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes the user’s BYOK OpenRouter API key.
Source§fn list_api_keys<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<ListApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_api_keys<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<ListApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all API keys for the authenticated user.
Source§fn get_openrouter_byok_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<GetOpenRouterByokApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_openrouter_byok_api_key<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<GetOpenRouterByokApiKeyResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the user’s BYOK OpenRouter API key.
Source§fn get_credits<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<GetCreditsResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_credits<'life0, 'async_trait>(
&'life0 self,
_ctx: Context<CTXEXT>,
) -> Pin<Box<dyn Future<Output = Result<GetCreditsResponse, ResponseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the user’s available credit balance.
Auto Trait Implementations§
impl Freeze for ObjectiveAiClient
impl !RefUnwindSafe for ObjectiveAiClient
impl Send for ObjectiveAiClient
impl Sync for ObjectiveAiClient
impl Unpin for ObjectiveAiClient
impl !UnwindSafe for ObjectiveAiClient
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> 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