Trait mesh::payload::MessageDecode
source · pub trait MessageDecode<'a, T, R>: Sized {
// Required method
fn read_message(
item: &mut InplaceOption<'_, T>,
reader: MessageReader<'a, '_, R>,
) -> Result<(), Error>;
}
Expand description
The MessageEncode
trait provides a message decoder for type T
.
R
is the external resource type, which allows decoding objects with
non-protobuf resources such as file descriptors. Most implementors of this
trait will be generic over all R
.
Required Methods§
sourcefn read_message(
item: &mut InplaceOption<'_, T>,
reader: MessageReader<'a, '_, R>,
) -> Result<(), Error>
fn read_message( item: &mut InplaceOption<'_, T>, reader: MessageReader<'a, '_, R>, ) -> Result<(), Error>
Reads a message into item
.
Object Safety§
This trait is not object safe.