pub struct EvilcorpSecondPilotClient {
pub token: Box<String>,
pub token_expires_at: i64,
}Fields§
§token: Box<String>§token_expires_at: i64Implementations§
Source§impl EvilcorpSecondPilotClient
impl EvilcorpSecondPilotClient
pub fn new(token: String) -> Self
pub async fn get_token(&self) -> Result<TokenResponse, Box<dyn Error>>
pub async fn get_or_refresh_token(&mut self) -> Result<String, Box<dyn Error>>
pub async fn query_simple( &mut self, message: &str, ) -> Result<String, Box<dyn Error>>
pub async fn query( &mut self, req: &CompletionRequest, ) -> Result<String, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for EvilcorpSecondPilotClient
impl Clone for EvilcorpSecondPilotClient
Source§fn clone(&self) -> EvilcorpSecondPilotClient
fn clone(&self) -> EvilcorpSecondPilotClient
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 EvilcorpSecondPilotClient
impl RefUnwindSafe for EvilcorpSecondPilotClient
impl Send for EvilcorpSecondPilotClient
impl Sync for EvilcorpSecondPilotClient
impl Unpin for EvilcorpSecondPilotClient
impl UnwindSafe for EvilcorpSecondPilotClient
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