pub struct StateBridge {
implementation: Mutex<Option<Arc<dyn StateBridgeImpl + Send + Sync>>>,
}Expand description
Thread-safe wrapper around the registered StateBridgeImpl instance.
Fields§
§implementation: Mutex<Option<Arc<dyn StateBridgeImpl + Send + Sync>>>Implementations§
Source§impl StateBridge
impl StateBridge
Sourcepub fn is_registered(&self) -> bool
pub fn is_registered(&self) -> bool
Returns true if an implementation has been registered.
Source§impl StateBridge
impl StateBridge
Sourcepub async fn set_user_key(&self, value: &SymmetricCryptoKey)
pub async fn set_user_key(&self, value: &SymmetricCryptoKey)
Stores the user_key value.
Sourcepub async fn get_user_key(&self) -> Option<SymmetricCryptoKey>
pub async fn get_user_key(&self) -> Option<SymmetricCryptoKey>
Returns the user_key value, if available.
Sourcepub async fn clear_user_key(&self)
pub async fn clear_user_key(&self)
Clears the user_key value.
Sourcepub async fn set_persistent_pin_envelope(
&self,
value: &PasswordProtectedKeyEnvelope,
)
pub async fn set_persistent_pin_envelope( &self, value: &PasswordProtectedKeyEnvelope, )
Stores the persistent_pin_envelope value.
Sourcepub async fn get_persistent_pin_envelope(
&self,
) -> Option<PasswordProtectedKeyEnvelope>
pub async fn get_persistent_pin_envelope( &self, ) -> Option<PasswordProtectedKeyEnvelope>
Returns the persistent_pin_envelope value, if available.
Sourcepub async fn clear_persistent_pin_envelope(&self)
pub async fn clear_persistent_pin_envelope(&self)
Clears the persistent_pin_envelope value.
Sourcepub async fn set_ephemeral_pin_envelope(
&self,
value: &PasswordProtectedKeyEnvelope,
)
pub async fn set_ephemeral_pin_envelope( &self, value: &PasswordProtectedKeyEnvelope, )
Stores the ephemeral_pin_envelope value.
Sourcepub async fn get_ephemeral_pin_envelope(
&self,
) -> Option<PasswordProtectedKeyEnvelope>
pub async fn get_ephemeral_pin_envelope( &self, ) -> Option<PasswordProtectedKeyEnvelope>
Returns the ephemeral_pin_envelope value, if available.
Sourcepub async fn clear_ephemeral_pin_envelope(&self)
pub async fn clear_ephemeral_pin_envelope(&self)
Clears the ephemeral_pin_envelope value.
Sourcepub async fn set_encrypted_pin(&self, value: &EncString)
pub async fn set_encrypted_pin(&self, value: &EncString)
Stores the encrypted_pin value.
Sourcepub async fn get_encrypted_pin(&self) -> Option<EncString>
pub async fn get_encrypted_pin(&self) -> Option<EncString>
Returns the encrypted_pin value, if available.
Sourcepub async fn clear_encrypted_pin(&self)
pub async fn clear_encrypted_pin(&self)
Clears the encrypted_pin value.
Sourcepub async fn set_v2_upgrade_token(&self, value: &V2UpgradeToken)
pub async fn set_v2_upgrade_token(&self, value: &V2UpgradeToken)
Stores the v2_upgrade_token value.
Sourcepub async fn get_v2_upgrade_token(&self) -> Option<V2UpgradeToken>
pub async fn get_v2_upgrade_token(&self) -> Option<V2UpgradeToken>
Returns the v2_upgrade_token value, if available.
Sourcepub async fn clear_v2_upgrade_token(&self)
pub async fn clear_v2_upgrade_token(&self)
Clears the v2_upgrade_token value.
Sourcepub async fn set_account_cryptographic_state(
&self,
value: &WrappedAccountCryptographicState,
)
pub async fn set_account_cryptographic_state( &self, value: &WrappedAccountCryptographicState, )
Stores the account_cryptographic_state value.
Sourcepub async fn get_account_cryptographic_state(
&self,
) -> Option<WrappedAccountCryptographicState>
pub async fn get_account_cryptographic_state( &self, ) -> Option<WrappedAccountCryptographicState>
Returns the account_cryptographic_state value, if available.
Sourcepub async fn clear_account_cryptographic_state(&self)
pub async fn clear_account_cryptographic_state(&self)
Clears the account_cryptographic_state value.
Sourcepub async fn set_masterpassword_unlock_data(
&self,
value: &MasterPasswordUnlockData,
)
pub async fn set_masterpassword_unlock_data( &self, value: &MasterPasswordUnlockData, )
Stores the masterpassword_unlock_data value.
Sourcepub async fn get_masterpassword_unlock_data(
&self,
) -> Option<MasterPasswordUnlockData>
pub async fn get_masterpassword_unlock_data( &self, ) -> Option<MasterPasswordUnlockData>
Returns the masterpassword_unlock_data value, if available.
Sourcepub async fn clear_masterpassword_unlock_data(&self)
pub async fn clear_masterpassword_unlock_data(&self)
Clears the masterpassword_unlock_data value.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StateBridge
impl RefUnwindSafe for StateBridge
impl Send for StateBridge
impl Sync for StateBridge
impl Unpin for StateBridge
impl UnsafeUnpin for StateBridge
impl UnwindSafe for StateBridge
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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