pub struct CopilotProvider { /* private fields */ }Expand description
GitHub Copilot usage provider (GitHub OAuth/PAT token auth).
Implementations§
Source§impl CopilotProvider
impl CopilotProvider
pub fn new() -> Self
Sourcepub fn with_base_url(url: &str) -> Self
pub fn with_base_url(url: &str) -> Self
Creates a provider with a custom base URL (for tests).
Trait Implementations§
Source§impl Default for CopilotProvider
impl Default for CopilotProvider
Source§impl UsageProvider for CopilotProvider
impl UsageProvider for CopilotProvider
Source§fn metadata(&self) -> &ProviderMetadata
fn metadata(&self) -> &ProviderMetadata
Returns the provider metadata.
Source§fn detect_credentials(&self) -> bool
fn detect_credentials(&self) -> bool
Whether credentials for this provider are detectable on this machine
(used to auto-enable providers without an explicit toggle).
Source§fn fetch_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 ProviderContext,
) -> Pin<Box<dyn Future<Output = Result<UsageSnapshot, SpendPanelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 ProviderContext,
) -> Pin<Box<dyn Future<Output = Result<UsageSnapshot, SpendPanelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetches usage data.
Auto Trait Implementations§
impl Freeze for CopilotProvider
impl RefUnwindSafe for CopilotProvider
impl Send for CopilotProvider
impl Sync for CopilotProvider
impl Unpin for CopilotProvider
impl UnsafeUnpin for CopilotProvider
impl UnwindSafe for CopilotProvider
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