blob: 38f14023b58aa70ce254ffba17ea759b6887dcae [file] [log] [blame]
//! Common traits
/// Common trait for structures serialization
pub trait Serialize<O = Vec<u8>> {
/// Type of serialization error
type Error;
/// Try to serialize object
fn serialize(&self) -> Result<O, Self::Error>;
}