Trait StoreKey

Source
pub trait StoreKey: KeyBase + Ord {
    // Required method
    fn write_to(&self, buf: &mut Vec<u8>);
}
Expand description

A trait for keys that can be stored in the database. They need to allow hashing and comparison.

Required Methods§

Source

fn write_to(&self, buf: &mut Vec<u8>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl StoreKey for &[u8]

Source§

fn write_to(&self, buf: &mut Vec<u8>)

Source§

impl StoreKey for u8

Source§

fn write_to(&self, buf: &mut Vec<u8>)

Source§

impl StoreKey for Vec<u8>

Source§

fn write_to(&self, buf: &mut Vec<u8>)

Source§

impl<A: StoreKey, B: StoreKey> StoreKey for (A, B)

Source§

fn write_to(&self, buf: &mut Vec<u8>)

Source§

impl<T: StoreKey> StoreKey for &T

Source§

fn write_to(&self, buf: &mut Vec<u8>)

Source§

impl<const N: usize> StoreKey for [u8; N]

Source§

fn write_to(&self, buf: &mut Vec<u8>)

Implementors§