pub struct ServerObservation {
pub standing: Option<ServerStanding>,
pub reason: Option<String>,
pub url: Option<String>,
pub pid: Option<u32>,
pub version: Option<String>,
pub surfaces: Vec<(String, String, bool)>,
pub this_process: bool,
}Expand description
What the lease named and what the address it names answered, if it was asked.
use majordomus_cli::capability::builtin::server::ServerStanding;
use majordomus_cli::environment::preflight::{derive, Observations, ServerObservation, Verdict};
let mut o = Observations::empty("demo", 0);
o.server = ServerObservation {
standing: Some(ServerStanding::Outdated),
reason: Some("the server is serving version 0.6.1".into()),
..Default::default()
};
assert_eq!(derive(&o).check("integration.server").unwrap().verdict, Verdict::Degraded);Fields§
§standing: Option<ServerStanding>Where it stands; None when there is a lease and nobody asked the address.
reason: Option<String>Why, when it is not ready.
url: Option<String>The address it published.
pid: Option<u32>Its process id.
version: Option<String>The version it serves.
surfaces: Vec<(String, String, bool)>Every surface its index lists, with whether it is ready; empty when it did not answer.
this_process: boolWhether the answer came from this very process, which holds the lease.
Trait Implementations§
Source§impl Clone for ServerObservation
impl Clone for ServerObservation
Source§fn clone(&self) -> ServerObservation
fn clone(&self) -> ServerObservation
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 ServerObservation
impl Debug for ServerObservation
Source§impl Default for ServerObservation
impl Default for ServerObservation
Source§fn default() -> ServerObservation
fn default() -> ServerObservation
Returns the “default value” for a type. Read more
impl Eq for ServerObservation
Source§impl PartialEq for ServerObservation
impl PartialEq for ServerObservation
Source§fn eq(&self, other: &ServerObservation) -> bool
fn eq(&self, other: &ServerObservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ServerObservation
Auto Trait Implementations§
impl Freeze for ServerObservation
impl RefUnwindSafe for ServerObservation
impl Send for ServerObservation
impl Sync for ServerObservation
impl Unpin for ServerObservation
impl UnsafeUnpin for ServerObservation
impl UnwindSafe for ServerObservation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.