Trait ledger_proto::EncDec

pub trait EncDec<'a, E = Error>: Encode<Error = E> + Decode<'a, Output = Self, Error = E> { }
Expand description

Composite trait requiring an object is reversibly encodable and decodable into borrowed types, useful for simplifying type bounds / generics.

(ie. Self == <Self as Decode>::Output, <Self as Encode::Error> == <Self as Decode::Error>)

Implementors§

§

impl<'a, T, E> EncDec<'a, E> for Twhere T: Decode<'a, Output = T, Error = E> + Encode<Error = E>,

Automatic implementation for types implementing Encode and Decode