Trait mesh::message::SerializeMessage

source ·
pub trait SerializeMessage: 'static + Send {
    type Concrete: Any;

    // Required methods
    fn compute_message_size(&mut self, sizer: MessageSizer<'_>);
    fn write_message(self, writer: MessageWriter<'_, '_, Resource>);
    fn extract(self) -> Self::Concrete;
}
Expand description

Trait implemented by concrete messages that can be extracted or serialized into SerializedMessage.

Required Associated Types§

source

type Concrete: Any

The underlying concrete message type.

Required Methods§

source

fn compute_message_size(&mut self, sizer: MessageSizer<'_>)

Computes the message size, as in MessageEncode::compute_message_size.

source

fn write_message(self, writer: MessageWriter<'_, '_, Resource>)

Writes the message, as in MessageEncode::write_message.

source

fn extract(self) -> Self::Concrete

Extract the concrete message.

Implementors§