pub struct Envelope {
pub proto: String,
pub msg_type: String,
pub method: Option<String>,
pub params: Option<Map<String, Value>>,
pub id: Option<String>,
pub result: Option<Map<String, Value>>,
pub error: Option<ErrorObject>,
pub payload: Option<Value>,
pub receipt: Option<String>,
pub extra: Map<String, Value>,
}Expand description
Unified {proto, type, method, params, id} envelope.
Fields§
§proto: StringProtocol version (defaults to empty when omitted by legacy frames).
msg_type: StringMessage class.
method: Option<String>RPC / subscription method.
params: Option<Map<String, Value>>Structured params.
id: Option<String>Correlation id.
result: Option<Map<String, Value>>Success result.
error: Option<ErrorObject>Structured error.
payload: Option<Value>Stream payload (next).
receipt: Option<String>Optional receipt id.
extra: Map<String, Value>Extra fields (status frames, etc.).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Envelope
impl<'de> Deserialize<'de> for Envelope
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 StructuralPartialEq for Envelope
Auto Trait Implementations§
impl Freeze for Envelope
impl RefUnwindSafe for Envelope
impl Send for Envelope
impl Sync for Envelope
impl Unpin for Envelope
impl UnsafeUnpin for Envelope
impl UnwindSafe for Envelope
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