Skip to main content

Evolving

Trait Evolving 

Source
pub trait Evolving<'de>: Sized {
    // Required methods
    fn encode_evolving(
        &self,
        output: &mut Vec<u8>,
        encoding: Encoding,
        limits: Limits,
    ) -> Result<(), Error>;
    fn decode_evolving(
        input: &'de [u8],
        encoding: Encoding,
        limits: Limits,
    ) -> Result<Self, Error>;
}
Expand description

A value with typed encoding and projection through the evolutionary codec.

Decoded values may borrow from the frame or payload for 'de. Both directions must use a sparse message root.

Required Methods§

Source

fn encode_evolving( &self, output: &mut Vec<u8>, encoding: Encoding, limits: Limits, ) -> Result<(), Error>

Encode one complete value into reusable output.

§Errors

Returns an encoding or admission error and leaves output empty.

Source

fn decode_evolving( input: &'de [u8], encoding: Encoding, limits: Limits, ) -> Result<Self, Error>

Decode and project one complete frame or payload from the given input.

§Errors

Returns a framing, decoding, incompatibility, or admission error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'__wire_read, T> Evolving<'__wire_read> for Message<T>
where T: Inline<'__wire_read>,