pub struct CodineerApiClient { /* private fields */ }Implementations§
Source§impl CodineerApiClient
impl CodineerApiClient
pub fn new(api_key: impl Into<String>) -> Self
pub fn from_auth(auth: AuthSource) -> Self
pub fn from_env() -> Result<Self, ApiError>
pub fn with_auth_source(self, auth: AuthSource) -> Self
pub fn with_auth_token(self, auth_token: Option<String>) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_retry_policy(self, retry: RetryPolicy) -> Self
pub fn auth_source(&self) -> &AuthSource
pub async fn send_message( &self, request: &MessageRequest, ) -> Result<MessageResponse, ApiError>
pub async fn stream_message( &self, request: &MessageRequest, ) -> Result<MessageStream, ApiError>
pub async fn exchange_oauth_code( &self, config: &OAuthConfig, request: &OAuthTokenExchangeRequest, ) -> Result<OAuthTokenSet, ApiError>
pub async fn refresh_oauth_token( &self, config: &OAuthConfig, request: &OAuthRefreshRequest, ) -> Result<OAuthTokenSet, ApiError>
Trait Implementations§
Source§impl Clone for CodineerApiClient
impl Clone for CodineerApiClient
Source§fn clone(&self) -> CodineerApiClient
fn clone(&self) -> CodineerApiClient
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 CodineerApiClient
impl !RefUnwindSafe for CodineerApiClient
impl Send for CodineerApiClient
impl Sync for CodineerApiClient
impl Unpin for CodineerApiClient
impl UnsafeUnpin for CodineerApiClient
impl !UnwindSafe for CodineerApiClient
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