commit | ebb187258f97aff0a9e7a0e31b3233b5570f3266 | [log] [tgz] |
---|---|---|
author | Yiming Jing <[email protected]> | Fri Jul 16 13:15:12 2021 -0700 |
committer | Yiming Jing <[email protected]> | Fri Jul 16 13:15:12 2021 -0700 |
tree | 293b11b9b7e5c859eda0cc9fa0d558321a90fb92 | |
parent | 61f3cdd73fa997537b62c352e6b36c9b271246da [diff] [blame] |
Initial import of rusticata-macros-3.1.0 Bug: 193833713 Change-Id: I8c64a1f7a387fb4162d80d201b1cfcd7172ed0f3
diff --git a/src/traits.rs b/src/traits.rs new file mode 100644 index 0000000..38f1402 --- /dev/null +++ b/src/traits.rs
@@ -0,0 +1,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>; +}