pub struct Anthropic;Expand description
The Anthropic [[accounts]] provider token.
Trait Implementations§
Source§impl ProviderBackend for Anthropic
impl ProviderBackend for Anthropic
Source§fn billing(&self) -> BillingModel
fn billing(&self) -> BillingModel
Billing shape.
Source§fn source(&self) -> UsageSourceKind
fn source(&self) -> UsageSourceKind
The source kind this backend’s probe stamps on the snapshots
it returns;
budget refuses a cached snapshot of any other
kind.Source§fn probe<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
account: &'life1 AccountEnv<'life2>,
host: &'life3 dyn ProviderHost,
) -> Pin<Box<dyn Future<Output = Result<UsageSnapshot, ProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn probe<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
account: &'life1 AccountEnv<'life2>,
host: &'life3 dyn ProviderHost,
) -> Pin<Box<dyn Future<Output = Result<UsageSnapshot, ProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
One probe round-trip: credential resolution, URL derivation,
headers, status classification, payload-to-snapshot mapping.
Strict-vs-lenient mapping lives in the impls, not in a flag.
Source§fn repair(&self, _account: &AccountEnv<'_>, err: &ProbeError) -> RepairAction
fn repair(&self, _account: &AccountEnv<'_>, err: &ProbeError) -> RepairAction
What this backend allows after a failed probe. The shared
default: the auth classes are terminal (an env credential is
fixed when the session spawns and there is no local credential
repair to fire) and
everything else retries. Backends whose provider repairs
differently override this.
Source§fn budget(
&self,
account: &str,
snapshot: Option<&UsageSnapshot>,
) -> AccountBudget
fn budget( &self, account: &str, snapshot: Option<&UsageSnapshot>, ) -> AccountBudget
The budget shape this backend renders for one account’s cached
usage snapshot. Read more
Auto Trait Implementations§
impl Freeze for Anthropic
impl RefUnwindSafe for Anthropic
impl Send for Anthropic
impl Sync for Anthropic
impl Unpin for Anthropic
impl UnsafeUnpin for Anthropic
impl UnwindSafe for Anthropic
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