Add enc/decode traits to store

This commit is contained in:
Paul Hauner
2019-05-01 14:29:03 +10:00
parent 157d4900aa
commit cf8a24c2bd
2 changed files with 43 additions and 11 deletions

View File

@@ -0,0 +1,16 @@
/*
use types::*;
impl StoreEncode for Hash256 {
fn as_store_bytes(&self) -> Vec<u8> {
self.as_bytes().to_vec()
}
}
impl StoreDecode for Hash256 {
fn from_store_bytes(bytes: &mut [u8]) -> Vec<u8> {
Hash256::from_slice()
self.as_bytes().to_vec()
}
}
*/