pub struct SavedCredentialStore {
pub credentials_dir: PathBuf,
}Expand description
Storage backend for credential files
Fields§
§credentials_dir: PathBufImplementations§
Source§impl SavedCredentialStore
impl SavedCredentialStore
Sourcepub fn new_with_dir(credentials_dir: PathBuf) -> Self
pub fn new_with_dir(credentials_dir: PathBuf) -> Self
Create a new credential store with custom directory (for backward compatibility)
Sourcepub fn ensure_dir(&self) -> Result<()>
pub fn ensure_dir(&self) -> Result<()>
Ensure the credentials directory exists
Sourcepub fn credential_path(&self, credential_id: &str) -> PathBuf
pub fn credential_path(&self, credential_id: &str) -> PathBuf
Get the file path for a credential
Sourcepub fn save(&self, credential: &CredentialData) -> Result<()>
pub fn save(&self, credential: &CredentialData) -> Result<()>
Save a credential to disk
Sourcepub fn load(&self, credential_id: &str) -> Result<SavedCredential>
pub fn load(&self, credential_id: &str) -> Result<SavedCredential>
Load a credential from disk
Sourcepub fn list(&self) -> Result<Vec<SavedCredential>>
pub fn list(&self) -> Result<Vec<SavedCredential>>
List all saved credentials
Sourcepub fn list_names(&self) -> Result<Vec<String>>
pub fn list_names(&self) -> Result<Vec<String>>
Get all credential names
Sourcepub fn find_by_template_type(
&self,
template_type: &TemplateType,
) -> Result<Vec<SavedCredential>>
pub fn find_by_template_type( &self, template_type: &TemplateType, ) -> Result<Vec<SavedCredential>>
Find credentials by template type
Auto Trait Implementations§
impl Freeze for SavedCredentialStore
impl RefUnwindSafe for SavedCredentialStore
impl Send for SavedCredentialStore
impl Sync for SavedCredentialStore
impl Unpin for SavedCredentialStore
impl UnwindSafe for SavedCredentialStore
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