Skip to main content

DirResponse

Enum DirResponse 

pub enum DirResponse {
Show 18 variants Registered, Refreshed, Rejected, PossessionFailed, Found { identity: Vec<u8>, bundle: Vec<u8>, }, Deposited(u32), DepositRejected, NotFound, Rotated, Unauthorized, Unregistered, RecoverySet, NoRecovery, ReservedHandle, Fresh, RolledBack, RateLimited, RegistrationClosed,
}
Expand description

The directory’s response.

Variants§

§

Registered

A registration for a previously unregistered address succeeded.

§

Refreshed

A registration under the address’s existing identity refreshed its bundle.

§

Rejected

A registration was refused: the address is bound to a different identity (trust on first use).

§

PossessionFailed

A registration was refused: the signature did not prove possession of the submitted identity key.

§

Found

The looked-up device’s published material.

Fields

§identity: Vec<u8>
§bundle: Vec<u8>
§

Deposited(u32)

The pool was stocked; the value is its new depth, so a client can decide whether to send more without a second round trip.

§

DepositRejected

The presented identity is not the one bound to this address.

§

NotFound

The looked-up device is not registered.

§

Rotated

A rotation succeeded; the binding now holds the new key.

§

Unauthorized

A rotation was refused: not authorized by the currently bound key.

§

Unregistered

A rotation was refused: the address is not registered.

§

RecoverySet

A recovery key was attached to the address.

§

NoRecovery

A recover was refused: the address has no recovery key set.

§

ReservedHandle

A registration was refused: the handle is in the namespace reserved for account provisioning.

Distinct from Rejected on purpose. Rejected means trust on first use found a different key already bound, which a caller can reason about. This means the caller may never bind this shape of handle over the unauthenticated directory path however unclaimed it is, and a developer who confuses the two will go looking for a phantom existing binding.

§

Fresh

A witnessed generation is at or ahead of the highest the directory has seen: the presented state is current (decision 0078).

§

RolledBack

A witnessed generation is below the highest seen: an older state is being presented, which is a rollback. The client keeps its identity and discards its sessions (decision 0078, decision 3).

§

RateLimited

A new handle registration was refused because this source has made too many recently (registration admission control, RA-1, decision 0079).

Transient — retry later. Unlike Rejected (the handle belongs to another key) or ReservedHandle (the caller may never bind it), this says nothing about the handle or the key; it throttles the rate of new registrations per source. Only new bindings are limited — a re-confirm of a handle the source already holds is never refused this way. Checked after possession, so it leaks nothing to a caller who cannot prove the key.

§

RegistrationClosed

A new raw-handle registration was refused because the deployment runs AccountsOnly: unauthenticated self-registration is closed, and handles are obtained through authenticated account provisioning instead (RA-1 layer 2, decision 0080).

Permanent for this path, unlike RateLimited. Retrying the same unauthenticated registration cannot succeed; the caller must provision through an account. A re-confirm of a handle the caller already holds is not refused this way.

Trait Implementations§

§

impl Clone for DirResponse

§

fn clone(&self) -> DirResponse

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for DirResponse

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Eq for DirResponse

§

impl From<Deposit> for DirResponse

§

fn from(outcome: Deposit) -> DirResponse

Converts to this type from the input type.
§

impl From<RecoverySet> for DirResponse

§

fn from(outcome: RecoverySet) -> DirResponse

Converts to this type from the input type.
§

impl From<Registration> for DirResponse

§

fn from(outcome: Registration) -> DirResponse

Converts to this type from the input type.
§

impl From<Rotation> for DirResponse

§

fn from(outcome: Rotation) -> DirResponse

Converts to this type from the input type.
§

impl From<Witness> for DirResponse

§

fn from(outcome: Witness) -> DirResponse

Converts to this type from the input type.
§

impl PartialEq for DirResponse

§

fn eq(&self, other: &DirResponse) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl StructuralPartialEq for DirResponse

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V