pub struct AccountSessionStore { /* private fields */ }Expand description
Profile- and origin-scoped view of the shared account credential record.
Implementations§
Source§impl AccountSessionStore
impl AccountSessionStore
Sourcepub fn new(secrets: Secrets, profile: Option<&str>, api_base: &str) -> Self
pub fn new(secrets: Secrets, profile: Option<&str>, api_base: &str) -> Self
Create a store view for one local profile and one validated API origin.
Sourcepub fn load(&self) -> Result<Option<StoredAccountAuth>, AccountSessionError>
pub fn load(&self) -> Result<Option<StoredAccountAuth>, AccountSessionError>
Load and validate the selected account session from secure storage.
Sourcepub fn save(&self, bundle: AccountAuthBundle) -> Result<(), AccountSessionError>
pub fn save(&self, bundle: AccountAuthBundle) -> Result<(), AccountSessionError>
Validate and save an account bundle in the selected secure-store slot.
Sourcepub fn clear(&self) -> Result<(), AccountSessionError>
pub fn clear(&self) -> Result<(), AccountSessionError>
Remove only the selected profile/origin account session.
Sourcepub fn runtime_info_at(
&self,
now: DateTime<Utc>,
) -> Result<RuntimeAccountInfo, AccountSessionError>
pub fn runtime_info_at( &self, now: DateTime<Utc>, ) -> Result<RuntimeAccountInfo, AccountSessionError>
Read a token-free runtime receipt at a caller-supplied clock instant.
Trait Implementations§
Source§impl Clone for AccountSessionStore
impl Clone for AccountSessionStore
Source§fn clone(&self) -> AccountSessionStore
fn clone(&self) -> AccountSessionStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AccountSessionStore
impl !UnwindSafe for AccountSessionStore
impl Freeze for AccountSessionStore
impl Send for AccountSessionStore
impl Sync for AccountSessionStore
impl Unpin for AccountSessionStore
impl UnsafeUnpin for AccountSessionStore
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