Skip to main content

RegistrationStatus

Struct RegistrationStatus 

Source
pub struct RegistrationStatus {
    pub id: String,
    pub connection: String,
    pub state: RegistrationState,
    pub startup_confirmed: bool,
    pub readiness_critical: bool,
    pub observed_at: Option<Instant>,
    pub valid_until: Option<Instant>,
    pub error: Option<DiscoveryError>,
}
Expand description

注册目标的只读证据摘要;Active 仍需检查证据有效期。

Fields§

§id: String

注册目标的本地唯一标识。

§connection: String

承载该注册的连接 qualifier。

§state: RegistrationState

当前注册阶段;远端写入结果不明时不能当作成功。

§startup_confirmed: bool

是否曾完成启动所要求的首次注册确认。

§readiness_critical: bool

远端注册失去有效健康证据时是否影响宿主整体就绪。

§observed_at: Option<Instant>

最近一次有效健康证据的本地单调时刻。

§valid_until: Option<Instant>

当前健康证据的截止时刻;缺失或过期均不代表就绪。

§error: Option<DiscoveryError>

最近的注册或回查错误,不包含凭据原文。

Implementations§

Source§

impl RegistrationStatus

Source

pub fn is_ready(&self) -> bool

业务作用:读取无需网络访问的当前发布证据。

参数说明:无。

返回:已确认为 Active 且证据尚未到期才算远端就绪。

Trait Implementations§

Source§

impl Clone for RegistrationStatus

Source§

fn clone(&self) -> Self

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 RegistrationStatus

Source§

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

Formats the value using the given formatter. Read more

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> 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.