Trait encdec::EncDecOwned

source ·
pub trait EncDecOwned<E = Error>: Encode<Error = E> + DecodeOwned<Output = Self, Error = E> { }
Expand description

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

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

Implementors§

source§

impl<T, E> EncDecOwned<E> for Twhere T: DecodeOwned<Output = T, Error = E> + Encode<Error = E>,

Automatic implementation for types implementing Encode and Decode