Trait sewup::kv::traits::key::Key[][src]

pub trait Key: Clone + Sized + Serialize + DeserializeOwned {
    fn from_row_key(r: &Row) -> Result<Self> { ... }
fn to_row_key(&self) -> Result<Row> { ... }
fn gen_hash_key(&self, key_len: u32, value_len: u32) -> Result<Raw> { ... }
fn gen_hash(&self) -> Result<[u8; 24]> { ... } }
Expand description

helps to serialize struct as Key to row or deserialized from row

| 1st bytes | ...    | padding                   |
|-----------|--------|---------------------------|
| Header    | Binary | padding to n times Byte32 |

Header is the number of bytes for binary

Provided methods

Implementations on Foreign Types

Implementors