pub struct AnthropicConfig {
pub enabled: bool,
pub credentials_path: Option<PathBuf>,
pub accounts: Vec<AnthropicAccount>,
}Fields§
§enabled: bool§credentials_path: Option<PathBuf>Override the credentials file path (defaults to ~/.claude/.credentials.json).
This is the default account; extra subscriptions go in accounts.
accounts: Vec<AnthropicAccount>Extra Anthropic accounts beyond the default, each selected on the CLI
with --account <label> (issue #14). Empty by default, so existing
single-account configs are byte-for-byte unchanged.
Implementations§
Source§impl AnthropicConfig
impl AnthropicConfig
Sourcepub fn account(&self, label: &str) -> Result<&AnthropicAccount>
pub fn account(&self, label: &str) -> Result<&AnthropicAccount>
Find a configured extra account by label, or error listing the known labels so a typo fails loudly instead of silently hitting the default.
Sourcepub fn account_target(&self, label: &str) -> Result<(CredsTarget, Cache)>
pub fn account_target(&self, label: &str) -> Result<(CredsTarget, Cache)>
Resolve a named account to the credentials target + isolated cache it
fetches through: a strict CredsTarget::Explicit on the account’s file
(never the Keychain — issue #15) and an anthropic/<label> cache subdir.
Shared by the widget (--account) and the TUI’s per-account tab (#14,
#17) so both resolve accounts identically; the widget layers its
--cache-dir override on top of the cache returned here.
Trait Implementations§
Source§impl Clone for AnthropicConfig
impl Clone for AnthropicConfig
Source§fn clone(&self) -> AnthropicConfig
fn clone(&self) -> AnthropicConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnthropicConfig
impl Debug for AnthropicConfig
Source§impl Default for AnthropicConfig
impl Default for AnthropicConfig
Source§impl<'de> Deserialize<'de> for AnthropicConfigwhere
AnthropicConfig: Default,
impl<'de> Deserialize<'de> for AnthropicConfigwhere
AnthropicConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AnthropicConfig
impl RefUnwindSafe for AnthropicConfig
impl Send for AnthropicConfig
impl Sync for AnthropicConfig
impl Unpin for AnthropicConfig
impl UnsafeUnpin for AnthropicConfig
impl UnwindSafe for AnthropicConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more