pub struct AgentSession;Expand description
Explicit controller for the optional session agent. It caches selected content keys only when asked and never represents persistent Vault data.
Implementations§
Source§impl AgentSession
impl AgentSession
Sourcepub fn profile_signing_key(
&self,
vault_id: &str,
profile: &str,
) -> Result<Option<ProfileSigningKeyPair>>
pub fn profile_signing_key( &self, vault_id: &str, profile: &str, ) -> Result<Option<ProfileSigningKeyPair>>
Reads a cached profile signing identity, if one is present.
The private key remains in the session agent; callers should drop the returned value as soon as signing is complete.
Sourcepub fn cache_profile_signing_key(
&self,
vault_id: &str,
profile: &str,
key: ProfileSigningKeyPair,
ttl_seconds: Option<u64>,
) -> Result<()>
pub fn cache_profile_signing_key( &self, vault_id: &str, profile: &str, key: ProfileSigningKeyPair, ttl_seconds: Option<u64>, ) -> Result<()>
Caches a profile signing identity for the requested session TTL.
Sourcepub fn forget_profile_signing_key(
&self,
vault_id: &str,
profile: &str,
) -> Result<()>
pub fn forget_profile_signing_key( &self, vault_id: &str, profile: &str, ) -> Result<()>
Removes one cached profile signing identity.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Reports whether the session-agent process is running.
Trait Implementations§
Source§impl Clone for AgentSession
impl Clone for AgentSession
Source§fn clone(&self) -> AgentSession
fn clone(&self) -> AgentSession
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 moreimpl Copy for AgentSession
Source§impl Debug for AgentSession
impl Debug for AgentSession
Source§impl Default for AgentSession
impl Default for AgentSession
Source§fn default() -> AgentSession
fn default() -> AgentSession
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AgentSession
impl RefUnwindSafe for AgentSession
impl Send for AgentSession
impl Sync for AgentSession
impl Unpin for AgentSession
impl UnsafeUnpin for AgentSession
impl UnwindSafe for AgentSession
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