pub struct ReqwestClient { /* private fields */ }Expand description
Native reqwest-based transport.
Implementations§
Source§impl ReqwestClient
impl ReqwestClient
pub fn new() -> Self
pub fn with_client(client: Client) -> Self
Trait Implementations§
Source§impl Clone for ReqwestClient
impl Clone for ReqwestClient
Source§fn clone(&self) -> ReqwestClient
fn clone(&self) -> ReqwestClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ReqwestClient
impl Default for ReqwestClient
Source§impl HttpClient for ReqwestClient
impl HttpClient for ReqwestClient
fn post_json<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
bearer_token: &'life2 str,
body: &'life3 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Auto Trait Implementations§
impl Freeze for ReqwestClient
impl !RefUnwindSafe for ReqwestClient
impl Send for ReqwestClient
impl Sync for ReqwestClient
impl Unpin for ReqwestClient
impl UnsafeUnpin for ReqwestClient
impl !UnwindSafe for ReqwestClient
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