pub struct SemanticKeyRef {
pub btree: BtreeRef,
pub kind: SemanticKeyKind,
pub key_digest: [u8; 16],
}Expand description
Semantic key reference with a stable BLAKE3-based digest.
key_digest = Trunc128(BLAKE3("fsqlite:btree:key:v1" || kind || btree_id || canonical_key_bytes))
Fields§
§btree: BtreeRef§kind: SemanticKeyKind§key_digest: [u8; 16]Implementations§
Source§impl SemanticKeyRef
impl SemanticKeyRef
Sourcepub fn compute_digest(
kind: SemanticKeyKind,
btree: BtreeRef,
canonical_key_bytes: &[u8],
) -> [u8; 16]
pub fn compute_digest( kind: SemanticKeyKind, btree: BtreeRef, canonical_key_bytes: &[u8], ) -> [u8; 16]
Compute the key digest from kind, btree id, and canonical key bytes.
Sourcepub fn new(
btree: BtreeRef,
kind: SemanticKeyKind,
canonical_key_bytes: &[u8],
) -> Self
pub fn new( btree: BtreeRef, kind: SemanticKeyKind, canonical_key_bytes: &[u8], ) -> Self
Construct a SemanticKeyRef by computing the digest.
Trait Implementations§
Source§impl Clone for SemanticKeyRef
impl Clone for SemanticKeyRef
Source§fn clone(&self) -> SemanticKeyRef
fn clone(&self) -> SemanticKeyRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticKeyRef
impl Debug for SemanticKeyRef
Source§impl<'de> Deserialize<'de> for SemanticKeyRef
impl<'de> Deserialize<'de> for SemanticKeyRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SemanticKeyRef
impl Hash for SemanticKeyRef
Source§impl PartialEq for SemanticKeyRef
impl PartialEq for SemanticKeyRef
Source§impl Serialize for SemanticKeyRef
impl Serialize for SemanticKeyRef
impl Eq for SemanticKeyRef
impl StructuralPartialEq for SemanticKeyRef
Auto Trait Implementations§
impl Freeze for SemanticKeyRef
impl RefUnwindSafe for SemanticKeyRef
impl Send for SemanticKeyRef
impl Sync for SemanticKeyRef
impl Unpin for SemanticKeyRef
impl UnsafeUnpin for SemanticKeyRef
impl UnwindSafe for SemanticKeyRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).