aboutsummaryrefslogtreecommitdiff
path: root/src/zip/structs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/zip/structs.rs')
-rw-r--r--src/zip/structs.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/zip/structs.rs b/src/zip/structs.rs
index 9fd1aeb..ebecae7 100644
--- a/src/zip/structs.rs
+++ b/src/zip/structs.rs
@@ -58,11 +58,13 @@ pub struct ExtraHeader {
58 pub size: u16, 58 pub size: u16,
59} 59}
60 60
61#[inline]
61#[allow(dead_code)] 62#[allow(dead_code)]
62pub fn serialize<T: Serialize>(object: &mut T) -> StructResult<Vec<u8>> { 63pub fn serialize<T: Serialize>(object: &mut T) -> StructResult<Vec<u8>> {
63 Settings::new(ByteOrder::Le, VariantIndexType::U8).serialize(object) 64 Settings::new(ByteOrder::Le, VariantIndexType::U8).serialize(object)
64} 65}
65 66
67#[inline]
66pub fn deserialize<'de, T: Deserialize<'de>>(object: &'de [u8]) -> StructResult<T> { 68pub fn deserialize<'de, T: Deserialize<'de>>(object: &'de [u8]) -> StructResult<T> {
67 Settings::new(ByteOrder::Le, VariantIndexType::U8).deserialize(object) 69 Settings::new(ByteOrder::Le, VariantIndexType::U8).deserialize(object)
68} 70}