Skip to main content

QueryKey

Trait QueryKey 

Source
pub trait QueryKey: KeyBase {
    // Required method
    fn cmp(&self, key: &[u8]) -> Ordering;
}
Expand description

A trait for keys that can be used to query the database. They need to allow hashing and comparison with a byte slice (total order).

Required Methods§

Source

fn cmp(&self, key: &[u8]) -> Ordering

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl QueryKey for &[u8]

Source§

fn cmp(&self, key: &[u8]) -> Ordering

Source§

impl QueryKey for Box<[u8]>

Source§

fn cmp(&self, key: &[u8]) -> Ordering

Source§

impl QueryKey for Vec<u8>

Source§

fn cmp(&self, key: &[u8]) -> Ordering

Source§

impl QueryKey for u8

Source§

fn cmp(&self, key: &[u8]) -> Ordering

Source§

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

Source§

fn cmp(&self, key: &[u8]) -> Ordering

Source§

impl<T: QueryKey> QueryKey for &T

Source§

fn cmp(&self, key: &[u8]) -> Ordering

Source§

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

Source§

fn cmp(&self, key: &[u8]) -> Ordering

Implementors§