blob: 38f14023b58aa70ce254ffba17ea759b6887dcae (
plain)
1
2
3
4
5
6
7
8
9
|
//! 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>;
}
|