[−][src]Trait veriform::message::Message
Veriform messages.
This trait provides the primary API for encoding/decoding messages as Veriform.
It's not intended to be implemented directly, but instead derived using
the veriform::Message
procedural macro.
Required methods
fn decode<D>(decoder: &mut Decoder<D>, input: &[u8]) -> Result<Self, Error> where
D: Digest,
Self: Sized,
D: Digest,
Self: Sized,
Decode a Veriform message contained in the provided slice using the
given Decoder
.
fn encode<'a>(&self, buffer: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this message as Veriform into the provided buffer, returning a slice containing the encoded message on success.
fn encoded_len(&self) -> usize
Get the length of a message after being encoded as Veriform.
Provided methods
fn encode_vec(&self) -> Result<Vec<u8>, Error>
Encode this message as Veriform, allocating returning a byte vector on success.
Implementors
impl Message for Timestamp
[src]
fn decode<D>(decoder: &mut Decoder<D>, input: &[u8]) -> Result<Self, Error> where
D: Digest,
[src]
D: Digest,