/// Write a key for table `T` to bytes.
///
/// This simply pre-pends the serialized `key` with a serialised instance of the table `ID`.
Write a key for table `T` to bytes.
This simply pre-pends the serialized `key` with a serialised instance of the table `ID`.
Write a key for table ` T ` to bytes . This simply pre - pends the serialized ` key ` with a serialised instance of the table ` ID ` .
pub fn write_key<T>(key: &T::Key) -> bytekey::Result<Vec<u8>>
where
    T: Table,
{
    let mut key_bytes = vec![];
    bytekey::serialize_into(&mut key_bytes, &T::ID)?;
    bytekey::serialize_into(&mut key_bytes, key)?;
    Ok(key_bytes)
}
pub fn write_key < T > ( key : & T :: Key ) -> bytekey :: Result < Vec < u8 > > where T : Table , { let mut key_bytes = vec ! [ ] ; bytekey :: serialize_into ( & mut key_bytes , & T :: ID ) ? ; bytekey :: serialize_into ( & mut key_bytes , key ) ? ; Ok ( key_bytes ) }
Write a key for table `T` to bytes.
Write a key for table ` T ` to bytes .
key
&T::Key