pub enum DaemonResponse {
Success {
version: u32,
id: String,
ok: bool,
result: Value,
},
Failure {
version: u32,
id: String,
ok: bool,
error: String,
},
}Expand description
Response frame: success carries result, failure carries error.
The two shapes are told apart by which key exists, never by ok alone —
exactly like the TypeScript union, and the tagged representation here makes
a half-and-half frame impossible to express.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for DaemonResponse
impl Clone for DaemonResponse
Source§impl Debug for DaemonResponse
impl Debug for DaemonResponse
Source§impl<'de> Deserialize<'de> for DaemonResponse
impl<'de> Deserialize<'de> for DaemonResponse
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 DaemonResponse
impl PartialEq for DaemonResponse
Source§impl Serialize for DaemonResponse
impl Serialize for DaemonResponse
impl StructuralPartialEq for DaemonResponse
Auto Trait Implementations§
impl Forget for DaemonResponse
impl Freeze for DaemonResponsewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for DaemonResponse
impl RefUnwindSafe for DaemonResponse
impl Send for DaemonResponse
impl Sync for DaemonResponse
impl Unpin for DaemonResponse
impl UnsafeUnpin for DaemonResponsewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for DaemonResponse
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