pub struct OpenAI<Auth> { /* private fields */ }
Expand description
A handle to OpenAI.
Implementations§
Source§impl<Auth> OpenAI<Auth>where
Auth: AuthTokenProvider,
impl<Auth> OpenAI<Auth>where
Auth: AuthTokenProvider,
Sourcepub async fn req<R: OpenAIRequestProvider>(
&self,
r: &R,
) -> OpenAIResult<R::Response>
pub async fn req<R: OpenAIRequestProvider>( &self, r: &R, ) -> OpenAIResult<R::Response>
Sends a request to the OpenAI API.
Trait Implementations§
Auto Trait Implementations§
impl<Auth> Freeze for OpenAI<Auth>where
Auth: Freeze,
impl<Auth> !RefUnwindSafe for OpenAI<Auth>
impl<Auth> Send for OpenAI<Auth>where
Auth: Send,
impl<Auth> Sync for OpenAI<Auth>where
Auth: Sync,
impl<Auth> Unpin for OpenAI<Auth>where
Auth: Unpin,
impl<Auth> !UnwindSafe for OpenAI<Auth>
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