pub struct OpenRouterProvider { /* private fields */ }Expand description
OpenRouter API credits provider.
Implementations§
Source§impl OpenRouterProvider
impl OpenRouterProvider
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 OpenRouterProvider
impl Default for OpenRouterProvider
Source§impl UsageProvider for OpenRouterProvider
impl UsageProvider for OpenRouterProvider
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 OpenRouterProvider
impl RefUnwindSafe for OpenRouterProvider
impl Send for OpenRouterProvider
impl Sync for OpenRouterProvider
impl Unpin for OpenRouterProvider
impl UnsafeUnpin for OpenRouterProvider
impl UnwindSafe for OpenRouterProvider
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