pub struct Client<C: Config> { /* private fields */ }Expand description
Exa API client
The client is generic over a Config implementation that provides authentication
and API configuration.
Implementations§
Source§impl<C: Config> Client<C>
impl<C: Config> Client<C>
Sourcepub fn with_config(config: C) -> Self
pub fn with_config(config: C) -> Self
Creates a new client with the given configuration.
§Panics
Panics if the reqwest client cannot be built.
Sourcepub fn with_http_client(self, http: Client) -> Self
pub fn with_http_client(self, http: Client) -> Self
Replaces the HTTP client with a custom one
Sourcepub const fn with_backoff(self, backoff: ExponentialBuilder) -> Self
pub const fn with_backoff(self, backoff: ExponentialBuilder) -> Self
Replaces the backoff configuration for retry logic
Source§impl<C: Config> Client<C>
impl<C: Config> Client<C>
Sourcepub const fn find_similar(&self) -> FindSimilar<'_, C>
pub const fn find_similar(&self) -> FindSimilar<'_, C>
Returns the FindSimilar API resource
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Client<C>where
C: Freeze,
impl<C> !RefUnwindSafe for Client<C>
impl<C> Send for Client<C>
impl<C> Sync for Client<C>
impl<C> Unpin for Client<C>where
C: Unpin,
impl<C> UnsafeUnpin for Client<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for Client<C>
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