Trait mesh_protobuf::MessageDecode

source ·
pub trait MessageDecode<'a, T, R>: Sized {
    // Required method
    fn read_message(
        item: &mut InplaceOption<'_, T>,
        reader: MessageReader<'a, '_, R>,
    ) -> Result<()>;
}
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§

source

fn read_message( item: &mut InplaceOption<'_, T>, reader: MessageReader<'a, '_, R>, ) -> Result<()>

Reads a message into item.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, T, R, E: MessageDecode<'a, T, R>> MessageDecode<'a, Box<T>, R> for BoxEncoding<E>

source§

impl<'a, T, R, E: MessageDecode<'a, T, R>> MessageDecode<'a, T, R> for MessageEncoding<E>

source§

impl<'a, T: Clone, R, E: MessageDecode<'a, T, R>> MessageDecode<'a, Arc<T>, R> for ArcEncoding<E>

source§

impl<'de, T, R> MessageDecode<'de, T, R> for TableEncoder
where T: StructDecodeMetadata<'de, R>,

source§

impl<'de, T: OneofDecode<'de, R>, R> MessageDecode<'de, T, R> for OneofEncoder

source§

impl<'de, T: Transparent, E: MessageDecode<'de, T::Inner, R>, R> MessageDecode<'de, T, R> for TransparentEncoding<E>

source§

impl<R> MessageDecode<'_, Duration, R> for DurationEncoding

source§

impl<R> MessageDecode<'_, ProtobufMessage, R> for ProtobufMessageEncoding

source§

impl<R> MessageDecode<'_, SerializedMessage<R>, R> for SerializedMessageEncoder

source§

impl<T, R> MessageDecode<'_, T, R> for ImpossibleField

source§

impl<T: Message + Default, R> MessageDecode<'_, T, R> for ProstMessage