Trait serde_encrypt::serialize::TypedSerialized [−][src]
pub trait TypedSerialized {
type T;
fn new(serialized: Vec<u8>) -> Self
where
Self: Sized;
fn as_slice(&self) -> &[u8];
fn into_vec(self) -> Vec<u8>;
fn serialize(v: &Self::T) -> Result<Self, Error>
where
Self: Sized,
Self::T: Serialize;
fn deserialize<'de>(&'de self) -> Result<Self::T, Error>
where
Self::T: Deserialize<'de>;
}Expand description
Serialization abstract with type to serialize.
Serializer implementations must implement this trait.
Associated Types
Required methods
Failures
- SerializationError when failed to serialize message.
fn deserialize<'de>(&'de self) -> Result<Self::T, Error> where
Self::T: Deserialize<'de>, [src]
fn deserialize<'de>(&'de self) -> Result<Self::T, Error> where
Self::T: Deserialize<'de>, [src]Failures
- DeserializationError when failed to deserialize decrypted message.
Implementors
Failures
- SerializationError when failed to serialize message.
Failures
- DeserializationError when failed to deserialize decrypted message.
type T = T