#[repr(i32)]pub enum RecoveryMethodKind {
Unspecified = 0,
TimeLockedWebauthn = 1,
Social = 2,
PaperCode = 3,
}Expand description
Canonical recovery-method kinds. Mirrors the recovery_methods.kind
column. RECOVERY_METHOD_KIND_UNSPECIFIED is rejected by the server.
Variants§
Unspecified = 0
TimeLockedWebauthn = 1
Time-locked WebAuthn recovery credential (weft#183).
Social = 2
Social guardians with an M-of-N threshold (weft#185).
PaperCode = 3
Argon2id-hashed paper-code mnemonic (weft#186).
Implementations§
Source§impl RecoveryMethodKind
impl RecoveryMethodKind
Sourcepub const fn is_valid(value: i32) -> bool
pub const fn is_valid(value: i32) -> bool
Returns true if value is a variant of RecoveryMethodKind.
Sourcepub fn from_i32(value: i32) -> Option<RecoveryMethodKind>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<RecoveryMethodKind>
Use the TryFrom<i32> implementation instead
Converts an i32 to a RecoveryMethodKind, or None if value is not a valid variant.
Source§impl RecoveryMethodKind
impl RecoveryMethodKind
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for RecoveryMethodKind
impl Clone for RecoveryMethodKind
Source§fn clone(&self) -> RecoveryMethodKind
fn clone(&self) -> RecoveryMethodKind
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 moreimpl Copy for RecoveryMethodKind
Source§impl Debug for RecoveryMethodKind
impl Debug for RecoveryMethodKind
Source§impl Default for RecoveryMethodKind
impl Default for RecoveryMethodKind
Source§fn default() -> RecoveryMethodKind
fn default() -> RecoveryMethodKind
Returns the “default value” for a type. Read more
impl Eq for RecoveryMethodKind
Source§impl From<RecoveryMethodKind> for i32
impl From<RecoveryMethodKind> for i32
Source§fn from(value: RecoveryMethodKind) -> i32
fn from(value: RecoveryMethodKind) -> i32
Converts to this type from the input type.
Source§impl Hash for RecoveryMethodKind
impl Hash for RecoveryMethodKind
Source§impl Ord for RecoveryMethodKind
impl Ord for RecoveryMethodKind
Source§fn cmp(&self, other: &RecoveryMethodKind) -> Ordering
fn cmp(&self, other: &RecoveryMethodKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RecoveryMethodKind
impl PartialEq for RecoveryMethodKind
Source§impl PartialOrd for RecoveryMethodKind
impl PartialOrd for RecoveryMethodKind
impl StructuralPartialEq for RecoveryMethodKind
Source§impl TryFrom<i32> for RecoveryMethodKind
impl TryFrom<i32> for RecoveryMethodKind
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<RecoveryMethodKind, UnknownEnumValue>
fn try_from(value: i32) -> Result<RecoveryMethodKind, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for RecoveryMethodKind
impl RefUnwindSafe for RecoveryMethodKind
impl Send for RecoveryMethodKind
impl Sync for RecoveryMethodKind
impl Unpin for RecoveryMethodKind
impl UnsafeUnpin for RecoveryMethodKind
impl UnwindSafe for RecoveryMethodKind
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