pub struct LivenessResult {
pub status: LivenessStatus,
pub detail: Option<String>,
pub expires_at: Option<String>,
}Expand description
Outcome of LivenessProbe::test.
Fields§
§status: LivenessStatusClassified outcome.
detail: Option<String>Human-readable detail — account login, scope summary, upstream error message, …. Always optional; doctor / the validate CLI render it verbatim.
expires_at: Option<String>Upstream-reported expiry, when the API exposes one (GitHub
github-authentication-token-expiration header, GitLab
expires_at JSON field). P9.3 reads this back into the
global index.
Implementations§
Source§impl LivenessResult
impl LivenessResult
Sourcepub fn expired(expires_at: impl Into<String>) -> Self
pub fn expired(expires_at: impl Into<String>) -> Self
Convenience — Expired carrying the upstream-reported
expiry timestamp.
Sourcepub fn throttled(detail: impl Into<String>) -> Self
pub fn throttled(detail: impl Into<String>) -> Self
Convenience — Throttled with a detail string (e.g. the
Retry-After header value).
Sourcepub fn not_implemented(provider: impl Into<String>) -> Self
pub fn not_implemented(provider: impl Into<String>) -> Self
Convenience — NotImplemented carrying the provider
name so doctor can show “this provider has no native
introspection”.
Trait Implementations§
Source§impl Clone for LivenessResult
impl Clone for LivenessResult
Source§fn clone(&self) -> LivenessResult
fn clone(&self) -> LivenessResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LivenessResult
impl Debug for LivenessResult
Source§impl PartialEq for LivenessResult
impl PartialEq for LivenessResult
Source§fn eq(&self, other: &LivenessResult) -> bool
fn eq(&self, other: &LivenessResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for LivenessResult
impl StructuralPartialEq for LivenessResult
Auto Trait Implementations§
impl Freeze for LivenessResult
impl RefUnwindSafe for LivenessResult
impl Send for LivenessResult
impl Sync for LivenessResult
impl Unpin for LivenessResult
impl UnsafeUnpin for LivenessResult
impl UnwindSafe for LivenessResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.