[−][src]Trait exonum::storage::proof_map_index::ProofMapKey
A trait that defines a subset of storage key types which are suitable for use with
ProofMapIndex
.
The size of the keys must be exactly PROOF_MAP_KEY_SIZE
bytes and the keys must have
a uniform distribution.
Associated Types
type Output
The type of keys as read from the database.
Output
is not necessarily equal to Self
, which provides flexibility
for HashedKey
s and similar cases
where the key cannot be uniquely restored from the database.
Required methods
fn write_key(&self, _: &mut [u8])
Writes this key into a byte buffer.
The buffer is guaranteed to have size PROOF_MAP_KEY_SIZE
.
fn read_key(_: &[u8]) -> Self::Output
Reads this key from the buffer.
Implementations on Foreign Types
impl ProofMapKey for [u8; 32]
[src]
impl ProofMapKey for [u8; 32]
type Output = [u8; 32]
fn write_key(&self, buffer: &mut [u8]) | [src] |
fn read_key(raw: &[u8]) -> [u8; 32] | [src] |
Implementors
impl ProofMapKey for Hash
[src]
impl ProofMapKey for Hash
impl ProofMapKey for PublicKey
[src]
impl ProofMapKey for PublicKey
impl<T: HashedKey> ProofMapKey for T
[src]
impl<T: HashedKey> ProofMapKey for T