Trait near_sdk::store::key::ToKey

source ·
pub trait ToKey: Sealed {
    type KeyType: AsRef<[u8]>;

    fn to_key<Q: ?Sized>(
        prefix: &[u8],
        key: &Q,
        buffer: &mut Vec<u8>
    ) -> Self::KeyType
    where
        Q: BorshSerialize
; }
Expand description

Trait used to generate keys to store data based on a serializable structure.

Required Associated Types

Output type for the generated lookup key.

Required Methods

Implementors