pub struct Desired {
pub host: String,
pub port: u16,
pub version: String,
pub executable: Option<ExecutableIdentity>,
}Expand description
What this executable would want a server of this checkout to be: the address it would
bind, the version and the executable it would serve from. What standing is measured
against.
use majordomus_cli::capability::builtin::server::Desired;
let d = Desired { host: "127.0.0.1".into(), port: 8741, version: "1.0.0".into(), executable: None };
let v = serde_json::to_value(&d).unwrap();
assert_eq!(v["port"], 8741);
assert!(v.get("executable").is_none(), "an executable that cannot be located is not written as null");Fields§
§host: StringThe interface a server started here would bind: what MAJORDOMUS_HTTP_HOST names
in this process’s environment, and loopback when it names nothing.
port: u16The port it asks for first.
version: StringThis executable’s version.
executable: Option<ExecutableIdentity>This executable, when it can be located.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Desired
impl<'de> Deserialize<'de> for Desired
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Desired
Source§impl JsonSchema for Desired
impl JsonSchema for Desired
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Desired
Auto Trait Implementations§
impl Freeze for Desired
impl RefUnwindSafe for Desired
impl Send for Desired
impl Sync for Desired
impl Unpin for Desired
impl UnsafeUnpin for Desired
impl UnwindSafe for Desired
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<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
Compare self to
key and return true if they are equal.