pub struct MaintenanceOperations<'a> { /* private fields */ }Expand description
Focused maintenance operations exposed via AuthFramework::maintenance().
Backup, restore, and reset authentication state in the configured storage
backend. All operations support an ExecutionMode parameter that
controls whether changes are applied or merely previewed.
§Example
let maint = auth.maintenance();
// Preview a backup without writing to disk
let preview = maint.backup("/tmp/auth_backup.json", ExecutionMode::DryRun).await?;
println!("Would export {} records", preview.manifest.user_count);
// Perform the real backup
let report = maint.backup("/tmp/auth_backup.json", ExecutionMode::Execute).await?;Implementations§
Source§impl MaintenanceOperations<'_>
impl MaintenanceOperations<'_>
Sourcepub async fn backup(
&self,
output_path: &str,
mode: ExecutionMode,
) -> Result<BackupReport>
pub async fn backup( &self, output_path: &str, mode: ExecutionMode, ) -> Result<BackupReport>
Export a logical snapshot to disk.
Uses ExecutionMode for clarity at call sites.
Sourcepub async fn backup_to_file(
&self,
output_path: &str,
dry_run: bool,
) -> Result<BackupReport>
pub async fn backup_to_file( &self, output_path: &str, dry_run: bool, ) -> Result<BackupReport>
Export a logical snapshot to disk (legacy API).
Prefer backup with an ExecutionMode for
self-documenting call sites.
Sourcepub async fn restore(
&self,
backup_path: &str,
mode: ExecutionMode,
) -> Result<RestoreReport>
pub async fn restore( &self, backup_path: &str, mode: ExecutionMode, ) -> Result<RestoreReport>
Restore a logical snapshot from disk.
Uses ExecutionMode for clarity at call sites.
Sourcepub async fn restore_from_file(
&self,
backup_path: &str,
dry_run: bool,
) -> Result<RestoreReport>
pub async fn restore_from_file( &self, backup_path: &str, dry_run: bool, ) -> Result<RestoreReport>
Restore a logical snapshot from disk (legacy API).
Prefer restore with an ExecutionMode for
self-documenting call sites.
Sourcepub async fn reset_with_mode(&self, mode: ExecutionMode) -> Result<ResetReport>
pub async fn reset_with_mode(&self, mode: ExecutionMode) -> Result<ResetReport>
Reset logical authentication state in the configured backend.
Uses ExecutionMode for clarity at call sites.
Sourcepub async fn reset(&self, dry_run: bool) -> Result<ResetReport>
pub async fn reset(&self, dry_run: bool) -> Result<ResetReport>
Reset logical authentication state in the configured backend (legacy API).
Prefer reset_with_mode with an
ExecutionMode for self-documenting call sites.
Auto Trait Implementations§
impl<'a> Freeze for MaintenanceOperations<'a>
impl<'a> !RefUnwindSafe for MaintenanceOperations<'a>
impl<'a> Send for MaintenanceOperations<'a>
impl<'a> Sync for MaintenanceOperations<'a>
impl<'a> Unpin for MaintenanceOperations<'a>
impl<'a> UnsafeUnpin for MaintenanceOperations<'a>
impl<'a> !UnwindSafe for MaintenanceOperations<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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