pub struct EncodedMessage {
pub message_type: MessageType,
pub payload: Vec<u8>,
}Expand description
A message described by protocol type and already-CBOR-encoded payload bytes.
The payload is only the message-type payload, not the outer protocol
envelope and not the length-prefixed transport packet. The client still
builds { v, t, p }, derives frame flags, and assigns the correlation ID.
Fields§
§message_type: MessageTypeProtocol message type.
payload: Vec<u8>CBOR-encoded payload bytes.
Implementations§
Trait Implementations§
Source§impl Clone for EncodedMessage
impl Clone for EncodedMessage
Source§fn clone(&self) -> EncodedMessage
fn clone(&self) -> EncodedMessage
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 EncodedMessage
impl Debug for EncodedMessage
Source§impl IntoOutboundMessage for EncodedMessage
impl IntoOutboundMessage for EncodedMessage
Source§fn into_outbound_message(
self,
protocol_version: u8,
negotiated_version: u8,
) -> AgentClientResult<OutboundMessage>
fn into_outbound_message( self, protocol_version: u8, negotiated_version: u8, ) -> AgentClientResult<OutboundMessage>
Encode the outbound message for a connection. Read more
Auto Trait Implementations§
impl Freeze for EncodedMessage
impl RefUnwindSafe for EncodedMessage
impl Send for EncodedMessage
impl Sync for EncodedMessage
impl Unpin for EncodedMessage
impl UnsafeUnpin for EncodedMessage
impl UnwindSafe for EncodedMessage
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