pub struct CopilotSession { /* private fields */ }Expand description
Manages a short-lived Copilot session token, auto-refreshing on expiry.
GitHub Copilot’s chat API requires a session token obtained by exchanging the long-lived OAuth device-flow token. Session tokens expire after ~30 minutes. This struct caches the active session and transparently refreshes it when needed.
Can also be initialized with an imported session token (no OAuth token). In that case, it will use the session token until it expires, then fail.
Implementations§
Source§impl CopilotSession
impl CopilotSession
Auto Trait Implementations§
impl !Freeze for CopilotSession
impl !RefUnwindSafe for CopilotSession
impl Send for CopilotSession
impl Sync for CopilotSession
impl Unpin for CopilotSession
impl UnsafeUnpin for CopilotSession
impl !UnwindSafe for CopilotSession
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