#[repr(i32)]pub enum HandleAvailability {
Unspecified = 0,
Available = 1,
Held = 2,
Taken = 3,
Reserved = 4,
Confusable = 5,
}Expand description
Availability of a native handle after normalization and classification. RESERVED represents an explicit policy reservation; implementations MUST NOT infer it merely because a name is otherwise unavailable.
Variants§
Unspecified = 0
No usable classification was produced. The caller may retry the safe GetHandleStatus read; it MUST NOT infer that a mutation is allowed.
Available = 1
No other-owner hold, active native handle, or confusable collision blocks
this caller. held_for_verified_owner = false means a genuinely free name:
a new account claims it through BeginWebAuthnRegistration followed by
RegisterPublicKey. held_for_verified_owner = true means the caller may
own the nonblocking verified-owner hold; ClaimHandle is the authoritative
self-claim check.
Held = 2
A verified-owner hold for another subject blocks this caller. The only mutation offered to the caller is RequestHeldName, which starts the right-of-first-refusal window without exposing the owner.
Taken = 3
An active native handle already owns this name. ResolveHandle can read the public subject-free projection; no claim or escrow mutation is available.
Reserved = 4
Explicit policy reservation. No handle mutation is available for this candidate; choose another candidate and call GetHandleStatus again.
Confusable = 5
The candidate conflicts with a trust-bearing handle under the confusable classifier, so no free-name registration mutation is available; choose another candidate and call GetHandleStatus again. ClaimHandle remains only for a previously earned caller-owned verified-owner hold and is the authoritative check for that hidden ownership fact.
Implementations§
Source§impl HandleAvailability
impl HandleAvailability
Sourcepub const fn is_valid(value: i32) -> bool
pub const fn is_valid(value: i32) -> bool
Returns true if value is a variant of HandleAvailability.
Sourcepub fn from_i32(value: i32) -> Option<HandleAvailability>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<HandleAvailability>
Use the TryFrom<i32> implementation instead
Converts an i32 to a HandleAvailability, or None if value is not a valid variant.
Source§impl HandleAvailability
impl HandleAvailability
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 HandleAvailability
impl Clone for HandleAvailability
Source§fn clone(&self) -> HandleAvailability
fn clone(&self) -> HandleAvailability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more