pub struct ServerStatus {
pub checkout_id: String,
pub git: Option<GitIdentity>,
pub desired: Desired,
pub this_process: Option<LeaseView>,
pub standing: ServerStanding,
pub servers: Vec<ServerView>,
pub connections: Option<ConnectionCounts>,
}Expand description
The shared server of this checkout and of every other checkout of the repository.
use majordomus_cli::capability::builtin::server::{Desired, ServerStanding, ServerStatus};
let status = ServerStatus { checkout_id: "c".into(), git: None,
desired: Desired { host: "127.0.0.1".into(), port: 8741, version: "1.0.0".into(), executable: None },
this_process: None, standing: ServerStanding::Absent, servers: Vec::new(),
connections: None };
let text = serde_json::to_string(&status).unwrap();
assert_eq!(serde_json::from_str::<ServerStatus>(&text).unwrap(), status);Fields§
§checkout_id: StringThis checkout’s identity: what this process answers as repository_id.
git: Option<GitIdentity>The git repository this checkout belongs to; absent where git cannot be asked.
desired: DesiredWhat this executable would serve, and what standing is measured against.
this_process: Option<LeaseView>The lease this process holds, when it is the server; absent when the question was answered by a process that serves nothing.
standing: ServerStandingWhere this checkout’s server stands.
servers: Vec<ServerView>Every checkout of the repository, the primary first, each with its server. One entry — this checkout — where git cannot be asked.
connections: Option<ConnectionCounts>What this process’s HTTP server did to connections that held it without a request: the read deadline it applies, the connections that deadline closed, and the requests refused because every handler was busy. Absent when this process serves no HTTP.
Trait Implementations§
Source§impl Clone for ServerStatus
impl Clone for ServerStatus
Source§fn clone(&self) -> ServerStatus
fn clone(&self) -> ServerStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerStatus
impl Debug for ServerStatus
Source§impl<'de> Deserialize<'de> for ServerStatus
impl<'de> Deserialize<'de> for ServerStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ServerStatus
Source§impl JsonSchema for ServerStatus
impl JsonSchema for ServerStatus
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ServerStatus
impl PartialEq for ServerStatus
Source§fn eq(&self, other: &ServerStatus) -> bool
fn eq(&self, other: &ServerStatus) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ServerStatus
impl Serialize for ServerStatus
impl StructuralPartialEq for ServerStatus
Auto Trait Implementations§
impl Freeze for ServerStatus
impl RefUnwindSafe for ServerStatus
impl Send for ServerStatus
impl Sync for ServerStatus
impl Unpin for ServerStatus
impl UnsafeUnpin for ServerStatus
impl UnwindSafe for ServerStatus
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
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
key and return true if they are equal.