pub struct Envelope {
tag: String,
payload: Option<Value>,
route: EnvelopeRoute,
}Fields§
§tag: String§payload: Option<Value>§route: EnvelopeRouteImplementations§
Source§impl Envelope
impl Envelope
pub fn message(tag: &str, payload: Option<Value>) -> Self
pub fn request(tag: &str, request_id: RequestId, payload: Option<Value>) -> Self
pub fn response( tag: &str, response_to: RequestId, payload: Option<Value>, ) -> Self
pub(super) fn into_parts(self) -> (String, Option<Value>, EnvelopeRoute)
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 Eq for Envelope
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