pub struct BitmapMeta {
pub base: KeyMeta,
}Expand description
位图结构元数据(对标 Apache Kvrocks BitmapMetadata)
Fields§
§base: KeyMetaImplementations§
Source§impl BitmapMeta
impl BitmapMeta
pub const ENCODED_SIZE: usize = crate::meta::KeyMeta::ENCODED_SIZE
pub const KVROCKS_ENCODED_SIZE: usize = crate::meta::KeyMeta::KVROCKS_COMPLEX_ENCODED_SIZE
pub const fn new(expire_at: u64, version: u64, size: u64) -> Self
pub fn new_with_version(expire_at: u64, size: u64) -> Self
pub const fn size(&self) -> u64
pub const fn version(&self) -> u64
pub const fn expire_at(&self) -> u64
pub const fn ttl(&self, now_ms: u64) -> i64
pub const fn is_empty(&self) -> bool
pub const fn is_expired(&self, now_ms: u64) -> bool
pub fn encode(&self) -> [u8; 26]
pub fn encode_kvrocks(&self) -> Vec<u8> ⓘ
pub fn decode(bytes: &[u8]) -> Option<Self>
Trait Implementations§
Source§impl Clone for BitmapMeta
impl Clone for BitmapMeta
Source§fn clone(&self) -> BitmapMeta
fn clone(&self) -> BitmapMeta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BitmapMeta
Source§impl Debug for BitmapMeta
impl Debug for BitmapMeta
impl<'__de> Decode<'__de> for BitmapMetawhere
'__de:,
impl Encode for BitmapMeta
impl Eq for BitmapMeta
Source§impl MetaOps for BitmapMeta
impl MetaOps for BitmapMeta
Source§const TAG: &[u8]
const TAG: &[u8]
Metadata key tag slice (e.g.
b"sm", b"hm").
meta key 标签(如 b"sm", b"hm"),用于 check_key_not_other_typetype EncodedBytes = [u8; 26]
fn decode(bytes: &[u8]) -> Option<Self>
fn is_expired(&self, now_ms: u64) -> bool
Source§fn encode_bytes(&self) -> Self::EncodedBytes
fn encode_bytes(&self) -> Self::EncodedBytes
Encoded bytes slice for storage write operations without heap allocation.
编码后的字节,用于写入存储(零堆分配)
Source§impl PartialEq for BitmapMeta
impl PartialEq for BitmapMeta
impl StructuralPartialEq for BitmapMeta
Auto Trait Implementations§
impl Freeze for BitmapMeta
impl RefUnwindSafe for BitmapMeta
impl Send for BitmapMeta
impl Sync for BitmapMeta
impl Unpin for BitmapMeta
impl UnsafeUnpin for BitmapMeta
impl UnwindSafe for BitmapMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.