pub enum Response {
Status(StatusReply),
Accepted {
state: SupervisorState,
protocol_version: u32,
},
Refused {
reason: String,
},
Error {
reason: String,
},
}Expand description
Response frame returned by the daemon. Status is the only
variant that carries a non-trivial payload; the others are
ack/error shapes so a misbehaving daemon cannot pretend to
have acted when it has not.
Variants§
Status(StatusReply)
Three-questions answer from StatusReply.
Accepted
Request accepted; daemon will (or has) acted. Carries the post-action state so the CLI can render it without a follow-up round-trip.
Refused
Request understood but refused. Carries a single-line operator-readable reason — never the empty string.
Error
Request malformed or unsupported. Dialer should surface this verbatim; this is the “I don’t know that verb” path, not the “I tried and failed” path.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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 Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Forget for Response
impl Freeze for Response
impl Move for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.