Skip to main content

MirrorAdvertiseState

Enum MirrorAdvertiseState 

Source
pub enum MirrorAdvertiseState {
    AdvertisingOverride,
    AdvertisingDerived,
    Off,
    NoPublicAddress,
    UncorroboratedAddress,
    NoRelay,
}
Expand description

Which of dig-node#562’s AdvertiseState outcomes produced a MirrorAdvertiseView.

Restated here, under the SAME six spellings, so a client and the node cannot drift on what one of them means — see the conformance KAT that pins each literal wire token. Named states rather than a bare empty MirrorAdvertiseView::urls list, because the four ways of publishing nothing have four different remedies and an empty list alone cannot tell them apart: a UI that only sees [] cannot say “nothing configured”, “switched off”, “not discovered yet”, “waiting on a second source” and “waiting on a relay” apart, and each of those calls for different operator action (or none).

Variants§

§

AdvertisingOverride

Publishing the operator’s own override; their value always wins.

§

AdvertisingDerived

Publishing this node’s own reflexive peer address, because no operator override is set.

§

Off

The operator set an override and no entry in it is publishable.

§

NoPublicAddress

No operator override, and this node does not yet know a public address it could publish.

§

UncorroboratedAddress

Exactly one source has reported a public address for this node and nothing has confirmed it yet — a single source can be wrong without erroring.

§

NoRelay

A public address is known, but no path to this node (a relay reservation or a confirmed direct mapping) is currently held.

Implementations§

Source§

impl MirrorAdvertiseState

Source

pub const ALL: [MirrorAdvertiseState; 6]

Every variant, so a completeness test walks the SET rather than a chosen example.

Trait Implementations§

Source§

impl Clone for MirrorAdvertiseState

Source§

fn clone(&self) -> MirrorAdvertiseState

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
Source§

impl Copy for MirrorAdvertiseState

Source§

impl Debug for MirrorAdvertiseState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MirrorAdvertiseState

Source§

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 Eq for MirrorAdvertiseState

Source§

impl PartialEq for MirrorAdvertiseState

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for MirrorAdvertiseState

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MirrorAdvertiseState

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
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.