Trait prost::Message [] [src]

pub trait Message: Debug + Default + PartialEq + Send + Sync {
    fn merge<B>(&mut self, buf: &mut Take<B>) -> Result<()>
    where
        B: Buf
; fn encoded_len(&self) -> usize; fn encode<B>(&self, buf: &mut B) -> Result<()>
    where
        B: BufMut
, { ... } fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<()>
    where
        B: BufMut
, { ... } fn decode<B>(buf: &mut Take<B>) -> Result<Self>
    where
        B: Buf,
        Self: Default
, { ... } fn decode_length_delimited<B>(buf: &mut B) -> Result<Self>
    where
        B: Buf,
        Self: Default
, { ... } fn merge_length_delimited<B>(&mut self, buf: &mut B) -> Result<()>
    where
        B: Buf
, { ... } }

A Protocol Buffers message.

Required Methods

Decodes an instance of the message from the buffer, and merges it into self. The entire buffer will be consumed.

The encoded length of the message without a length delimiter.

Provided Methods

Encodes the message, and writes it to the buffer. An error will be returned if the buffer does not have sufficient capacity.

Encodes the message, and writes it with a length-delimiter prefix to the buffer. An error will be returned if the buffer does not have sufficient capacity.

Decodes an instance of the message from the buffer. The entire buffer will be consumed.

Decodes a length-delimited instance of the message from the buffer.

Decodes a length-delimited instance of the message from the buffer, and merges it into self.

Implementors