pub struct StateBridgeClient {
pub(crate) client: Client,
}Expand description
Client for interacting with the key-management state bridge. This is used to read and write state held by the clients
Fields§
§client: ClientImplementations§
Source§impl StateBridgeClient
impl StateBridgeClient
Sourcepub fn is_bridge_registered(&self) -> bool
pub fn is_bridge_registered(&self) -> bool
Returns true if a state bridge implementation has been registered.
Sourcepub fn register_bridge(
&self,
bridge_impl: Box<dyn StateBridgeImpl + Send + Sync>,
)
pub fn register_bridge( &self, bridge_impl: Box<dyn StateBridgeImpl + Send + Sync>, )
Registers a bridge implementation used to read and write temporary key-management state.
Source§impl StateBridgeClient
impl StateBridgeClient
Sourcepub async fn set_user_key(&self, value: &SymmetricCryptoKey)
pub async fn set_user_key(&self, value: &SymmetricCryptoKey)
Sets the user_key value in client-managed state.
Sourcepub async fn get_user_key(&self) -> Option<SymmetricCryptoKey>
pub async fn get_user_key(&self) -> Option<SymmetricCryptoKey>
Gets the user_key value from client-managed state, if available.
Sourcepub async fn clear_user_key(&self)
pub async fn clear_user_key(&self)
Clears the user_key value from client-managed state.
Sourcepub async fn set_persistent_pin_envelope(
&self,
value: &PasswordProtectedKeyEnvelope,
)
pub async fn set_persistent_pin_envelope( &self, value: &PasswordProtectedKeyEnvelope, )
Sets the persistent_pin_envelope value in client-managed state.
Sourcepub async fn get_persistent_pin_envelope(
&self,
) -> Option<PasswordProtectedKeyEnvelope>
pub async fn get_persistent_pin_envelope( &self, ) -> Option<PasswordProtectedKeyEnvelope>
Gets the persistent_pin_envelope value from client-managed state, if available.
Sourcepub async fn clear_persistent_pin_envelope(&self)
pub async fn clear_persistent_pin_envelope(&self)
Clears the persistent_pin_envelope value from client-managed state.
Sourcepub async fn set_ephemeral_pin_envelope(
&self,
value: &PasswordProtectedKeyEnvelope,
)
pub async fn set_ephemeral_pin_envelope( &self, value: &PasswordProtectedKeyEnvelope, )
Sets the ephemeral_pin_envelope value in client-managed state.
Sourcepub async fn get_ephemeral_pin_envelope(
&self,
) -> Option<PasswordProtectedKeyEnvelope>
pub async fn get_ephemeral_pin_envelope( &self, ) -> Option<PasswordProtectedKeyEnvelope>
Gets the ephemeral_pin_envelope value from client-managed state, if available.
Sourcepub async fn clear_ephemeral_pin_envelope(&self)
pub async fn clear_ephemeral_pin_envelope(&self)
Clears the ephemeral_pin_envelope value from client-managed state.
Sourcepub async fn set_encrypted_pin(&self, value: &EncString)
pub async fn set_encrypted_pin(&self, value: &EncString)
Sets the encrypted_pin value in client-managed state.
Sourcepub async fn get_encrypted_pin(&self) -> Option<EncString>
pub async fn get_encrypted_pin(&self) -> Option<EncString>
Gets the encrypted_pin value from client-managed state, if available.
Sourcepub async fn clear_encrypted_pin(&self)
pub async fn clear_encrypted_pin(&self)
Clears the encrypted_pin value from client-managed state.
Sourcepub async fn set_v2_upgrade_token(&self, value: &V2UpgradeToken)
pub async fn set_v2_upgrade_token(&self, value: &V2UpgradeToken)
Sets the v2_upgrade_token value in client-managed state.
Sourcepub async fn get_v2_upgrade_token(&self) -> Option<V2UpgradeToken>
pub async fn get_v2_upgrade_token(&self) -> Option<V2UpgradeToken>
Gets the v2_upgrade_token value from client-managed state, if available.
Sourcepub async fn clear_v2_upgrade_token(&self)
pub async fn clear_v2_upgrade_token(&self)
Clears the v2_upgrade_token value from client-managed state.
Sourcepub async fn set_account_cryptographic_state(
&self,
value: &WrappedAccountCryptographicState,
)
pub async fn set_account_cryptographic_state( &self, value: &WrappedAccountCryptographicState, )
Sets the account_cryptographic_state value in client-managed state.
Sourcepub async fn get_account_cryptographic_state(
&self,
) -> Option<WrappedAccountCryptographicState>
pub async fn get_account_cryptographic_state( &self, ) -> Option<WrappedAccountCryptographicState>
Gets the account_cryptographic_state value from client-managed state, if available.
Sourcepub async fn clear_account_cryptographic_state(&self)
pub async fn clear_account_cryptographic_state(&self)
Clears the account_cryptographic_state value from client-managed state.
Sourcepub async fn set_masterpassword_unlock_data(
&self,
value: &MasterPasswordUnlockData,
)
pub async fn set_masterpassword_unlock_data( &self, value: &MasterPasswordUnlockData, )
Sets the masterpassword_unlock_data value in client-managed state.
Sourcepub async fn get_masterpassword_unlock_data(
&self,
) -> Option<MasterPasswordUnlockData>
pub async fn get_masterpassword_unlock_data( &self, ) -> Option<MasterPasswordUnlockData>
Gets the masterpassword_unlock_data value from client-managed state, if available.
Sourcepub async fn clear_masterpassword_unlock_data(&self)
pub async fn clear_masterpassword_unlock_data(&self)
Clears the masterpassword_unlock_data value from client-managed state.
Trait Implementations§
Source§impl Clone for StateBridgeClient
impl Clone for StateBridgeClient
Source§fn clone(&self) -> StateBridgeClient
fn clone(&self) -> StateBridgeClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl From<StateBridgeClient> for JsValue
impl From<StateBridgeClient> for JsValue
Source§fn from(value: StateBridgeClient) -> Self
fn from(value: StateBridgeClient) -> Self
Source§impl FromWasmAbi for StateBridgeClient
impl FromWasmAbi for StateBridgeClient
Source§impl IntoWasmAbi for StateBridgeClient
impl IntoWasmAbi for StateBridgeClient
Source§impl<UT> LiftRef<UT> for StateBridgeClient
impl<UT> LiftRef<UT> for StateBridgeClient
type LiftType = Arc<StateBridgeClient>
Source§impl<UT> LowerError<UT> for StateBridgeClient
impl<UT> LowerError<UT> for StateBridgeClient
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for StateBridgeClient
impl<UT> LowerReturn<UT> for StateBridgeClient
Source§type ReturnType = <Arc<StateBridgeClient> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<StateBridgeClient> as LowerReturn<UniFfiTag>>::ReturnType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl RefFromWasmAbi for StateBridgeClient
impl RefFromWasmAbi for StateBridgeClient
Source§type Anchor = RcRef<StateBridgeClient>
type Anchor = RcRef<StateBridgeClient>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl TryFromJsValue for StateBridgeClient
impl TryFromJsValue for StateBridgeClient
Source§impl<UT> TypeId<UT> for StateBridgeClient
impl<UT> TypeId<UT> for StateBridgeClient
const TYPE_ID_META: MetadataBuffer
Source§impl VectorFromWasmAbi for StateBridgeClient
impl VectorFromWasmAbi for StateBridgeClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[StateBridgeClient]>
Source§impl VectorIntoWasmAbi for StateBridgeClient
impl VectorIntoWasmAbi for StateBridgeClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[StateBridgeClient]>) -> Self::Abi
Source§impl WasmDescribe for StateBridgeClient
impl WasmDescribe for StateBridgeClient
impl SupportsConstructor for StateBridgeClient
impl SupportsInstanceProperty for StateBridgeClient
impl SupportsStaticProperty for StateBridgeClient
Auto Trait Implementations§
impl Freeze for StateBridgeClient
impl !RefUnwindSafe for StateBridgeClient
impl Send for StateBridgeClient
impl Sync for StateBridgeClient
impl Unpin for StateBridgeClient
impl UnsafeUnpin for StateBridgeClient
impl !UnwindSafe for StateBridgeClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.