pub enum UnlockOutcome {
Ok {
user_id: String,
},
WrongPin {
attempts_remaining: u32,
},
LockedOut {
until: String,
},
NeedsPassword,
}Expand description
The result of an unlock attempt.
Note the explicit field renames. tauri-specta emits tagged-union fields
with their Rust names rather than camelCasing them, so a field that would
differ between the two conventions is renamed here by hand — the same trap
that produced new_url on the frontend once already.
TRACES: UR-083, UR-084 | DR-268, DR-269
Variants§
Ok
Switched. The profile is now active.
WrongPin
Wrong code, attempts left.
LockedOut
Too many wrong codes; refused until this RFC3339 instant.
NeedsPassword
No code is recoverable from here — sign in with the account password.
Trait Implementations§
Source§impl Clone for UnlockOutcome
impl Clone for UnlockOutcome
Source§fn clone(&self) -> UnlockOutcome
fn clone(&self) -> UnlockOutcome
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 moreSource§impl Debug for UnlockOutcome
impl Debug for UnlockOutcome
Source§impl<'de> Deserialize<'de> for UnlockOutcome
impl<'de> Deserialize<'de> for UnlockOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl NamedType for UnlockOutcome
impl NamedType for UnlockOutcome
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
this is equivalent to [Type::inline] but returns a [NamedDataType] instead.
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
this is equivalent to [Type::definition] but returns a [NamedDataType] instead.
Source§impl PartialEq for UnlockOutcome
impl PartialEq for UnlockOutcome
Source§fn eq(&self, other: &UnlockOutcome) -> bool
fn eq(&self, other: &UnlockOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UnlockOutcome
impl Serialize for UnlockOutcome
Source§impl Type for UnlockOutcome
impl Type for UnlockOutcome
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition will be put into the type map.impl Eq for UnlockOutcome
impl Flatten for UnlockOutcome
impl StructuralPartialEq for UnlockOutcome
Auto Trait Implementations§
impl Freeze for UnlockOutcome
impl RefUnwindSafe for UnlockOutcome
impl Send for UnlockOutcome
impl Sync for UnlockOutcome
impl Unpin for UnlockOutcome
impl UnsafeUnpin for UnlockOutcome
impl UnwindSafe for UnlockOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
Gets the type of an argument as a [
DataType]. Read more