[−][src]Trait tendermint_proto::DomainType
DomainType trait allows protobuf encoding and decoding for domain types
Provided methods
fn encode<B: BufMut>(&self, buf: &mut B) -> Result<(), Error>
Encodes the DomainType into a buffer.
This function replaces the Prost::Message encode() function for DomainTypes.
fn encode_length_delimited<B: BufMut>(&self, buf: &mut B) -> Result<(), Error>
Encodes the DomainType with a length-delimiter to a buffer.
An error will be returned if the buffer does not have sufficient capacity.
This function replaces the Prost::Message encode_length_delimited() function for DomainTypes.
fn decode<B: Buf>(buf: B) -> Result<Self, Error>
Decodes an instance of the message from a buffer and then converts it into DomainType.
The entire buffer will be consumed.
This function replaces the Prost::Message decode() function for DomainTypes.
fn decode_length_delimited<B: Buf>(buf: B) -> Result<Self, Error>
Decodes a length-delimited instance of the message from the buffer.
The entire buffer will be consumed.
This function replaces the Prost::Message decode_length_delimited() function for DomainTypes.
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
This function replaces the Prost::Message encoded_len() function for DomainTypes.
fn encode_vec(&self) -> Result<Vec<u8>, Error>
Encodes the DomainType into a protobuf-encoded Vec
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Decodes a protobuf-encoded instance of the message from a Vec
fn encode_length_delimited_vec(&self) -> Result<Vec<u8>, Error>
Encodes the DomainType with a length-delimiter to a Vec
fn decode_length_delimited_vec(v: &[u8]) -> Result<Self, Error>
Decodes a protobuf-encoded instance of the message with a length-delimiter from a Vec