Skip to main content

IntoOutboundMessage

Trait IntoOutboundMessage 

Source
pub trait IntoOutboundMessage {
    // Required method
    fn into_outbound_message(
        self,
        protocol_version: u8,
        negotiated_version: u8,
    ) -> AgentClientResult<OutboundMessage>;
}
Expand description

Converts a typed or encoded message into an outbound protocol body.

Implementations must fail before sending when the negotiated peer generation is too old for the selected message type.

Required Methods§

Source

fn into_outbound_message( self, protocol_version: u8, negotiated_version: u8, ) -> AgentClientResult<OutboundMessage>

Encode the outbound message for a connection.

protocol_version is the generation written into the envelope. negotiated_version is the capability gate used before encoding.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§