wedb_embed 0.1.2

Embedded database engine providing Redis-like APIs, built on fjall / 嵌入式数据库引擎,提供类似 Redis 的接口,底层基于 fjall 开发
Documentation
use crate::key_composer::{KeyComposer, KeyTag, SmallKey};

/// 栈上定长构造 HLL 元数据键(零堆分配)
#[inline]
pub fn meta(kc: &KeyComposer<'_>, key: &[u8]) -> SmallKey {
  kc.compose_meta_key_stack(KeyTag::HllMeta.as_slice(), key)
}

/// 栈上定长构造 HLL 数据键(零堆分配)
#[inline]
pub fn raw(kc: &KeyComposer<'_>, key: &[u8]) -> SmallKey {
  kc.compose_meta_key_stack(KeyTag::HllRaw.as_slice(), key)
}

/// 构造 HLL 元数据前缀
#[inline]
pub fn meta_prefix(kc: &KeyComposer<'_>) -> Vec<u8> {
  kc.compose_meta_prefix(KeyTag::HllMeta.as_slice())
}