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§
Required Methods§
sourcefn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
Computes the message size, as in MessageEncode::compute_message_size
.
sourcefn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in MessageEncode::write_message
.