1//! Common traits 2 3/// Common trait for structures serialization 4pub trait Serialize<O = Vec<u8>> { 5 /// Type of serialization error 6 type Error; 7 /// Try to serialize object 8 fn serialize(&self) -> Result<O, Self::Error>; 9}