Skip to main content

SetMirrorAdvertiseUrlsResult

Struct SetMirrorAdvertiseUrlsResult 

Source
pub struct SetMirrorAdvertiseUrlsResult {
    pub mirror_advertise: MirrorAdvertiseView,
    pub requires_restart: bool,
}
Expand description

control.config.setMirrorAdvertiseUrls — the persisted view, plus whether it IS the live answer yet.

This does NOT reuse MirrorAdvertiseView alone the way CollateralMarginResult is shared between .get and .set, because unlike a margin this override has a genuine “not yet live” state a bare view cannot express. ConfigSetUpstream’s sibling result already carries exactly this shape (requires_restart) — restated here rather than reused because the TRUTH VALUE differs per method, not merely the field name.

Fields§

§mirror_advertise: MirrorAdvertiseView

What a follow-up control.config.get will show ONCE this takes effect. See Self::requires_restart for whether that is now or after a restart.

§requires_restart: bool

Whether dig-node must be RESTARTED before Self::mirror_advertise is the answer a LIVE config.get would give.

This is a report of what THIS node’s implementation actually did, never a value this contract fixes — unlike SetUpstreamResult::requires_restart, which is unconditionally true because that override feeds Config::from_env at process start and can never be read any other way. This override is different in kind: dig-node#562’s advertise decision is recomputed every mirror-coin-creation pass rather than read once at start, so LIVE is a real, reachable answer here.

It is not, however, the answer TODAY. dig-node#562’s recomputation reads DIG_MIRROR_ADVERTISE_URLS from the OS ENVIRONMENT of the running process (std::env::var), and no control call can change the environment of a process already running — so until dig-node persists this override somewhere its own advertise pass actually re-reads (a config-store write this call feeds, rather than an environment variable), a conforming node MUST answer true here. It MUST answer false the moment it does, and this field is what lets that improvement ship without a wire-contract change: a client that renders “saved” only when this is false never tells an operator their node is advertising a URL it is not.

Trait Implementations§

Source§

impl Clone for SetMirrorAdvertiseUrlsResult

Source§

fn clone(&self) -> SetMirrorAdvertiseUrlsResult

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 Debug for SetMirrorAdvertiseUrlsResult

Source§

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

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

impl<'de> Deserialize<'de> for SetMirrorAdvertiseUrlsResult

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 SetMirrorAdvertiseUrlsResult

Source§

impl PartialEq for SetMirrorAdvertiseUrlsResult

Source§

fn eq(&self, other: &SetMirrorAdvertiseUrlsResult) -> 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 SetMirrorAdvertiseUrlsResult

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 SetMirrorAdvertiseUrlsResult

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.