pub struct PinSettingsClient {
pub(crate) client: Client,
}Expand description
Sub-client for configuring PIN unlock behavior.
Fields§
§client: ClientImplementations§
Source§impl PinSettingsClient
impl PinSettingsClient
Sourcepub async fn set_pin(
&self,
pin: String,
lock_type: PinLockType,
) -> Result<(), PinSettingsError>
pub async fn set_pin( &self, pin: String, lock_type: PinLockType, ) -> Result<(), PinSettingsError>
Sets or updates the account PIN and stores the corresponding unlock state.
The lock_type determines how PIN unlock behaves for this account.
Returns an error when the PIN-protected state cannot be persisted.
Sourcepub async fn get_status(&self) -> PinUnlockStatus
pub async fn get_status(&self) -> PinUnlockStatus
Returns the current status of PIN unlock
Sourcepub async fn get_lock_type(&self) -> Option<PinLockType>
pub async fn get_lock_type(&self) -> Option<PinLockType>
Returns the configured PIN lock type, if a PIN lock is set.
Sourcepub async fn validate_pin(&self, pin: String) -> bool
pub async fn validate_pin(&self, pin: String) -> bool
Validates whether pin matches the currently configured unlock PIN.
Trait Implementations§
Source§impl Clone for PinSettingsClient
impl Clone for PinSettingsClient
Source§fn clone(&self) -> PinSettingsClient
fn clone(&self) -> PinSettingsClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<PinSettingsClient> for JsValue
impl From<PinSettingsClient> for JsValue
Source§fn from(value: PinSettingsClient) -> Self
fn from(value: PinSettingsClient) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for PinSettingsClient
impl FromWasmAbi for PinSettingsClient
Source§impl IntoWasmAbi for PinSettingsClient
impl IntoWasmAbi for PinSettingsClient
Source§impl<UT> LiftRef<UT> for PinSettingsClient
impl<UT> LiftRef<UT> for PinSettingsClient
type LiftType = Arc<PinSettingsClient>
Source§impl<UT> LowerError<UT> for PinSettingsClient
impl<UT> LowerError<UT> for PinSettingsClient
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for PinSettingsClient
impl<UT> LowerReturn<UT> for PinSettingsClient
Source§type ReturnType = <Arc<PinSettingsClient> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<PinSettingsClient> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl RefFromWasmAbi for PinSettingsClient
impl RefFromWasmAbi for PinSettingsClient
Source§type Anchor = RcRef<PinSettingsClient>
type Anchor = RcRef<PinSettingsClient>
The type that holds the reference to
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 PinSettingsClient
impl TryFromJsValue for PinSettingsClient
Source§impl<UT> TypeId<UT> for PinSettingsClient
impl<UT> TypeId<UT> for PinSettingsClient
const TYPE_ID_META: MetadataBuffer
Source§impl VectorFromWasmAbi for PinSettingsClient
impl VectorFromWasmAbi for PinSettingsClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[PinSettingsClient]>
Source§impl VectorIntoWasmAbi for PinSettingsClient
impl VectorIntoWasmAbi for PinSettingsClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[PinSettingsClient]>) -> Self::Abi
Source§impl WasmDescribe for PinSettingsClient
impl WasmDescribe for PinSettingsClient
impl SupportsConstructor for PinSettingsClient
impl SupportsInstanceProperty for PinSettingsClient
impl SupportsStaticProperty for PinSettingsClient
Auto Trait Implementations§
impl Freeze for PinSettingsClient
impl !RefUnwindSafe for PinSettingsClient
impl Send for PinSettingsClient
impl Sync for PinSettingsClient
impl Unpin for PinSettingsClient
impl UnsafeUnpin for PinSettingsClient
impl !UnwindSafe for PinSettingsClient
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
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
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§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
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.