pub enum ShepherdMessage {
Shutdown,
Action {
name: String,
params: Option<String>,
id: u64,
},
}Expand description
Daemon -> child message
Variants§
Shutdown
Graceful-stop request (shutdown_with_message)
Action
Custom action dispatch
Fields
§
params: Option<String>Argument text for the action, passed through to the child
verbatim; None when triggered without any. Omitted from the
wire when None, so a message with no arguments round-trips
byte-identical.
One opaque string the daemon never reads, so an app parses it in its own grammar.
§
id: u64This dispatch’s correlation id, unique for the life of the
daemon. Echo it back as id on your
ChildMessage::ActionReply. The daemon then matches your
answer to this request, not to its name.
Always present, unlike params. Treat u64 and increasing as
implementation details, not a promise.
Trait Implementations§
Source§impl Clone for ShepherdMessage
impl Clone for ShepherdMessage
Source§fn clone(&self) -> ShepherdMessage
fn clone(&self) -> ShepherdMessage
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 ShepherdMessage
impl Debug for ShepherdMessage
Source§impl<'de> Deserialize<'de> for ShepherdMessage
impl<'de> Deserialize<'de> for ShepherdMessage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShepherdMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShepherdMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ShepherdMessage
impl PartialEq for ShepherdMessage
Source§impl Serialize for ShepherdMessage
impl Serialize for ShepherdMessage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ShepherdMessage
Auto Trait Implementations§
impl Freeze for ShepherdMessage
impl RefUnwindSafe for ShepherdMessage
impl Send for ShepherdMessage
impl Sync for ShepherdMessage
impl Unpin for ShepherdMessage
impl UnsafeUnpin for ShepherdMessage
impl UnwindSafe for ShepherdMessage
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