pub struct IpcEnvelope {
pub token: String,
pub client_token: Option<String>,
pub origin: Option<Origin>,
pub message: IpcMessage,
}Expand description
Every IPC frame carries the daemon auth token alongside the message.
client_token and origin are optional and serde-defaulted in both
directions: an old client’s frames parse on a new daemon and vice versa.
Fields§
§token: String§client_token: Option<String>§origin: Option<Origin>§message: IpcMessageImplementations§
Source§impl IpcEnvelope
impl IpcEnvelope
pub fn new(token: String, message: IpcMessage) -> Self
pub fn with_client_token(self, client_token: Option<String>) -> Self
pub fn with_origin(self, origin: Origin) -> Self
Trait Implementations§
Source§impl Clone for IpcEnvelope
impl Clone for IpcEnvelope
Source§fn clone(&self) -> IpcEnvelope
fn clone(&self) -> IpcEnvelope
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 IpcEnvelope
impl Debug for IpcEnvelope
Source§impl<'de> Deserialize<'de> for IpcEnvelope
impl<'de> Deserialize<'de> for IpcEnvelope
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
Auto Trait Implementations§
impl Freeze for IpcEnvelope
impl RefUnwindSafe for IpcEnvelope
impl Send for IpcEnvelope
impl Sync for IpcEnvelope
impl Unpin for IpcEnvelope
impl UnsafeUnpin for IpcEnvelope
impl UnwindSafe for IpcEnvelope
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