pub struct AuthStore { /* private fields */ }Expand description
In-memory auth store for testing/stub implementation
Implementations§
Source§impl AuthStore
impl AuthStore
Sourcepub fn with_storage(path: PathBuf) -> Result<Self>
pub fn with_storage(path: PathBuf) -> Result<Self>
Create an auth store with persistent storage at the given path
Sourcepub fn default_storage_path() -> Result<PathBuf>
pub fn default_storage_path() -> Result<PathBuf>
Get default storage path: respects XDG_DATA_HOME, falls back to ~/.local/share/xcom-rs/auth.json
Sourcepub fn with_default_storage() -> Result<Self>
pub fn with_default_storage() -> Result<Self>
Create an auth store with default storage location
Sourcepub fn status(&self) -> AuthStatus
pub fn status(&self) -> AuthStatus
Get current authentication status
Sourcepub fn export(&self) -> Result<String>
pub fn export(&self) -> Result<String>
Export authentication data (returns encrypted in real implementation)
Sourcepub fn import(&mut self, data: &str) -> Result<()>
pub fn import(&mut self, data: &str) -> Result<()>
Import authentication data (expects encrypted data in real implementation)
Sourcepub fn import_with_plan(
&mut self,
data: &str,
dry_run: bool,
) -> Result<ImportPlan>
pub fn import_with_plan( &mut self, data: &str, dry_run: bool, ) -> Result<ImportPlan>
Import authentication data with dry-run support Returns an ImportPlan describing what would happen
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Check if authenticated
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthStore
impl RefUnwindSafe for AuthStore
impl Send for AuthStore
impl Sync for AuthStore
impl Unpin for AuthStore
impl UnwindSafe for AuthStore
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