rusticata-macros 5.0.0

Helper macros for Rusticata
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Common traits

#[cfg(not(feature = "std"))]
use alloc::vec::Vec;

/// 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>;
}