Skip to main content

IndexKeyed

Trait IndexKeyed 

Source
pub trait IndexKeyed: ProjectableIndex {
    type K: Key;
    type V: Clone + PartialEq;

    // Required method
    fn encode_value(&self, v: &Self::V) -> DbResult<Vec<u8>>;

    // Provided method
    fn encode_key(k: &Self::K) -> Vec<u8> ⓘ { ... }
}
Expand description

Associated key/value types for typed row/key helpers.

Required Associated Types§

Required Methods§

Source

fn encode_value(&self, v: &Self::V) -> DbResult<Vec<u8>>

Provided Methods§

Source

fn encode_key(k: &Self::K) -> Vec<u8> ⓘ

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, T: GetType + CollectionMeta + Clone + PartialEq + Send + Sync + 'static, C: Codec<T> + Clone + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for VarTypedMap<K, T, C, H>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, T: GetType + CollectionMeta + Clone + PartialEq + Send + Sync + 'static, C: Codec<T> + Clone + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for VarTypedTree<K, T, C, H>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, T: GetType + CollectionMeta + Clone + PartialEq + Send + Sync + 'static, C: Codec<T> + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for TypedMap<K, T, C, H>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, T: GetType + CollectionMeta + Clone + PartialEq + Send + Sync + 'static, C: Codec<T> + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for TypedTree<K, T, C, H>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, const V: usize, T: CollectionMeta + Copy + IntoBytes + FromBytes + Immutable + Default + PartialEq + Send + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for ZeroMap<K, V, T, H, Bitcask>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, const V: usize, T: CollectionMeta + Copy + IntoBytes + FromBytes + Immutable + Default + PartialEq + Send + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for ZeroMap<K, V, T, H, Fixed>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, const V: usize, T: CollectionMeta + Copy + IntoBytes + FromBytes + Immutable + Default + PartialEq + Send + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for ZeroTree<K, V, T, H, Bitcask>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T

Source§

impl<K: Key + Send + Sync + Hash + Eq + 'static, const V: usize, T: CollectionMeta + Copy + IntoBytes + FromBytes + Immutable + Default + PartialEq + Send + Sync + 'static, H: TypedWriteHook<K, T> + 'static> IndexKeyed for ZeroTree<K, V, T, H, Fixed>

Available on crate feature typed-tree only.
Source§

type K = K

Source§

type V = T