pub struct CredentialStore { /* private fields */ }Expand description
Owner-only API-key storage kept outside frontend-readable configuration.
Implementations§
Source§impl CredentialStore
impl CredentialStore
Sourcepub fn open(path: PathBuf) -> Result<Self>
pub fn open(path: PathBuf) -> Result<Self>
Opens credential state, treating a missing file as an empty store.
Sourcepub fn set(
&self,
instance: &str,
provider_id: &str,
api_key: &str,
base_url: Option<&str>,
) -> Result<()>
pub fn set( &self, instance: &str, provider_id: &str, api_key: &str, base_url: Option<&str>, ) -> Result<()>
Atomically replaces one instance’s API key after provider and size validation.
Auto Trait Implementations§
impl !Freeze for CredentialStore
impl RefUnwindSafe for CredentialStore
impl Send for CredentialStore
impl Sync for CredentialStore
impl Unpin for CredentialStore
impl UnsafeUnpin for CredentialStore
impl UnwindSafe for CredentialStore
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