Skip to main content

ToMessage

Trait ToMessage 

Source
pub trait ToMessage {
    // Required method
    fn to_message<S: MessageSerializer>(
        &self,
        serialize: &mut S,
    ) -> Result<(), SerError>;

    // Provided method
    fn to_bytes(&self) -> Result<Bytes, SerError> { ... }
}
Expand description

Serialize the IRC message from custom data structure.

Required Methods§

Source

fn to_message<S: MessageSerializer>( &self, serialize: &mut S, ) -> Result<(), SerError>

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§