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, not structured data: the daemon never reads it, so an app parses it in whatever grammar it already has.
§
id: u64This dispatch’s correlation id, unique for the life of the
daemon. Echo it back on your ChildMessage::ActionReply as
id and the daemon matches your answer to this exact request
rather than to its name.
Always present, unlike params. Treat it as an opaque token to
hand back: u64 and increasing are 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<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
Source§impl PartialEq for ShepherdMessage
impl PartialEq for ShepherdMessage
Source§impl Serialize for ShepherdMessage
impl Serialize for ShepherdMessage
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