pub trait AuthProvider: Send + Sync {
// Required method
fn availability(&self) -> SyncResult<()>;
// Provided methods
fn enabled(&self) -> bool { ... }
fn generation(&self) -> u64 { ... }
fn account_scope(&self) -> Option<String> { ... }
fn bearer(&self) -> SyncResult<Option<String>> { ... }
}Expand description
Account state and session credentials. generation changes on account
switch; an in-flight pass observing a different generation cancels itself.
Required Methods§
fn availability(&self) -> SyncResult<()>
Provided Methods§
fn generation(&self) -> u64
Sourcefn account_scope(&self) -> Option<String>
fn account_scope(&self) -> Option<String>
Stable opaque identity of the signed-in account/container/zone
(CloudKit helper: sha256(container|zone|userRecordName)), valid
after a successful availability(). The engine binds its ledger to
it and resets the ledger when it changes. None = no isolation.
Sourcefn bearer(&self) -> SyncResult<Option<String>>
fn bearer(&self) -> SyncResult<Option<String>>
Bearer value for HTTP-style backends, fetched per pass by the app’s own secure store; CloudKit backends return None.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".