Enum holochain_websocket::WireMessage [−][src]
pub enum WireMessage { Signal { data: Vec<u8>, }, Request { id: u64, data: Vec<u8>, }, Response { id: u64, data: Option<Vec<u8>>, }, }
Expand description
The messages actually sent over the wire by this library. If you want to impliment your own server or client you will need this type or be able to serialize / deserialize it.
Variants
A message without a response.
Show fields
Fields of Signal
data: Vec<u8>
Actual bytes of the message serialized as message pack.
A request that requires a response.
Show fields
Fields of Request
id: u64
The id of this request. Note ids are recycled once they are used.
data: Vec<u8>
Actual bytes of the message serialized as message pack.
The response to a request.
Show fields
Fields of Response
id: u64
The id of the request that this response is for.
data: Option<Vec<u8>>
Actual bytes of the message serialized as message pack.
Trait Implementations
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
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for WireMessage
impl Send for WireMessage
impl Sync for WireMessage
impl Unpin for WireMessage
impl UnwindSafe for WireMessage