pub struct InMemoryStateBridge {
user_key: Mutex<Option<SymmetricCryptoKey>>,
persistent_pin_envelope: Mutex<Option<PasswordProtectedKeyEnvelope>>,
ephemeral_pin_envelope: Mutex<Option<PasswordProtectedKeyEnvelope>>,
encrypted_pin: Mutex<Option<EncString>>,
v2_upgrade_token: Mutex<Option<V2UpgradeToken>>,
account_cryptographic_state: Mutex<Option<WrappedAccountCryptographicState>>,
masterpassword_unlock_data: Mutex<Option<MasterPasswordUnlockData>>,
}Expand description
In-memory StateBridgeImpl for use in tests.
Fields§
§user_key: Mutex<Option<SymmetricCryptoKey>>§persistent_pin_envelope: Mutex<Option<PasswordProtectedKeyEnvelope>>§ephemeral_pin_envelope: Mutex<Option<PasswordProtectedKeyEnvelope>>§encrypted_pin: Mutex<Option<EncString>>§v2_upgrade_token: Mutex<Option<V2UpgradeToken>>§account_cryptographic_state: Mutex<Option<WrappedAccountCryptographicState>>§masterpassword_unlock_data: Mutex<Option<MasterPasswordUnlockData>>Trait Implementations§
Source§impl Default for InMemoryStateBridge
impl Default for InMemoryStateBridge
Source§fn default() -> InMemoryStateBridge
fn default() -> InMemoryStateBridge
Returns the “default value” for a type. Read more
Source§impl StateBridgeImpl for InMemoryStateBridge
impl StateBridgeImpl for InMemoryStateBridge
Source§fn set_user_key<'life0, 'async_trait>(
&'life0 self,
value: SymmetricCryptoKey,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_user_key<'life0, 'async_trait>(
&'life0 self,
value: SymmetricCryptoKey,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores the
user_key value.Source§fn get_user_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<SymmetricCryptoKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<SymmetricCryptoKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the
user_key value, if available.Source§fn clear_user_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_user_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears the
user_key value.Source§fn set_persistent_pin_envelope<'life0, 'async_trait>(
&'life0 self,
value: PasswordProtectedKeyEnvelope,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_persistent_pin_envelope<'life0, 'async_trait>(
&'life0 self,
value: PasswordProtectedKeyEnvelope,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores the
persistent_pin_envelope value.Source§fn get_persistent_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<PasswordProtectedKeyEnvelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_persistent_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<PasswordProtectedKeyEnvelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the
persistent_pin_envelope value, if available.Source§fn clear_persistent_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_persistent_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears the
persistent_pin_envelope value.Source§fn set_ephemeral_pin_envelope<'life0, 'async_trait>(
&'life0 self,
value: PasswordProtectedKeyEnvelope,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_ephemeral_pin_envelope<'life0, 'async_trait>(
&'life0 self,
value: PasswordProtectedKeyEnvelope,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores the
ephemeral_pin_envelope value.Source§fn get_ephemeral_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<PasswordProtectedKeyEnvelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ephemeral_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<PasswordProtectedKeyEnvelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the
ephemeral_pin_envelope value, if available.Source§fn clear_ephemeral_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_ephemeral_pin_envelope<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears the
ephemeral_pin_envelope value.Source§fn set_encrypted_pin<'life0, 'async_trait>(
&'life0 self,
value: EncString,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_encrypted_pin<'life0, 'async_trait>(
&'life0 self,
value: EncString,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores the
encrypted_pin value.Source§fn get_encrypted_pin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<EncString>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_encrypted_pin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<EncString>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the
encrypted_pin value, if available.Source§fn clear_encrypted_pin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_encrypted_pin<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears the
encrypted_pin value.Source§fn set_v2_upgrade_token<'life0, 'async_trait>(
&'life0 self,
value: V2UpgradeToken,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_v2_upgrade_token<'life0, 'async_trait>(
&'life0 self,
value: V2UpgradeToken,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores the
v2_upgrade_token value.Source§fn get_v2_upgrade_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<V2UpgradeToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_v2_upgrade_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<V2UpgradeToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the
v2_upgrade_token value, if available.Source§fn clear_v2_upgrade_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_v2_upgrade_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears the
v2_upgrade_token value.Source§fn set_account_cryptographic_state<'life0, 'async_trait>(
&'life0 self,
value: WrappedAccountCryptographicState,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_account_cryptographic_state<'life0, 'async_trait>(
&'life0 self,
value: WrappedAccountCryptographicState,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores the
account_cryptographic_state value.Source§fn get_account_cryptographic_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<WrappedAccountCryptographicState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_cryptographic_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<WrappedAccountCryptographicState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the
account_cryptographic_state value, if available.Source§fn clear_account_cryptographic_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_account_cryptographic_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears the
account_cryptographic_state value.Source§fn set_masterpassword_unlock_data<'life0, 'async_trait>(
&'life0 self,
value: MasterPasswordUnlockData,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_masterpassword_unlock_data<'life0, 'async_trait>(
&'life0 self,
value: MasterPasswordUnlockData,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stores the
masterpassword_unlock_data value.Source§fn get_masterpassword_unlock_data<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<MasterPasswordUnlockData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_masterpassword_unlock_data<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<MasterPasswordUnlockData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the
masterpassword_unlock_data value, if available.Auto Trait Implementations§
impl !Freeze for InMemoryStateBridge
impl RefUnwindSafe for InMemoryStateBridge
impl Send for InMemoryStateBridge
impl Sync for InMemoryStateBridge
impl Unpin for InMemoryStateBridge
impl UnsafeUnpin for InMemoryStateBridge
impl UnwindSafe for InMemoryStateBridge
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
Mutably borrows from an owned value. Read more
§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
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
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>
Converts
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>
Converts
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