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§
Sourcefn 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.
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".