pub struct OpenAIChatGptAuthHandle { /* private fields */ }Expand description
Runtime auth state shared by OpenAI provider instances.
Implementations§
Source§impl OpenAIChatGptAuthHandle
impl OpenAIChatGptAuthHandle
pub fn new( session: OpenAIChatGptSession, auth_config: OpenAIAuthConfig, storage_mode: AuthCredentialsStoreMode, ) -> Self
pub fn snapshot(&self) -> Result<OpenAIChatGptSession>
pub fn current_api_key(&self) -> Result<String>
pub fn provider_label(&self) -> &'static str
pub async fn refresh_if_needed(&self) -> Result<()>
pub async fn force_refresh(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for OpenAIChatGptAuthHandle
impl Clone for OpenAIChatGptAuthHandle
Source§fn clone(&self) -> OpenAIChatGptAuthHandle
fn clone(&self) -> OpenAIChatGptAuthHandle
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 OpenAIChatGptAuthHandle
impl RefUnwindSafe for OpenAIChatGptAuthHandle
impl Send for OpenAIChatGptAuthHandle
impl Sync for OpenAIChatGptAuthHandle
impl Unpin for OpenAIChatGptAuthHandle
impl UnsafeUnpin for OpenAIChatGptAuthHandle
impl UnwindSafe for OpenAIChatGptAuthHandle
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