pub struct KvEncodedBlockV1 {
pub schema_version: String,
pub block_id: u32,
pub batch: u32,
pub layer: u32,
pub kv_head: u32,
pub token: u32,
pub vector_count: u32,
pub fixed_size_bytes: u32,
pub raw_fallback: bool,
pub reason: String,
pub encoding: KvBlockEncodingV1,
}Expand description
One fixed-addressable KV encoded block.
Fields§
§schema_version: StringStable schema marker.
block_id: u32Block id within the page.
batch: u32Batch index.
layer: u32Layer index.
kv_head: u32KV head index.
token: u32Token index.
vector_count: u32Number of source vectors in this block.
fixed_size_bytes: u32Fixed encoded byte reservation for random access.
raw_fallback: boolWhether this block is raw fallback/protected.
reason: StringHuman-readable fallback or compression reason.
encoding: KvBlockEncodingV1Payload.
Implementations§
Source§impl KvEncodedBlockV1
impl KvEncodedBlockV1
Sourcepub fn raw(
block_id: u32,
batch: u32,
layer: u32,
kv_head: u32,
token: u32,
values: Vec<f32>,
fixed_size_bytes: u32,
reason: impl Into<String>,
) -> Self
pub fn raw( block_id: u32, batch: u32, layer: u32, kv_head: u32, token: u32, values: Vec<f32>, fixed_size_bytes: u32, reason: impl Into<String>, ) -> Self
Build a raw block.
Trait Implementations§
Source§impl Clone for KvEncodedBlockV1
impl Clone for KvEncodedBlockV1
Source§fn clone(&self) -> KvEncodedBlockV1
fn clone(&self) -> KvEncodedBlockV1
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 moreSource§impl Debug for KvEncodedBlockV1
impl Debug for KvEncodedBlockV1
Source§impl<'de> Deserialize<'de> for KvEncodedBlockV1
impl<'de> Deserialize<'de> for KvEncodedBlockV1
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 PartialEq for KvEncodedBlockV1
impl PartialEq for KvEncodedBlockV1
Source§fn eq(&self, other: &KvEncodedBlockV1) -> bool
fn eq(&self, other: &KvEncodedBlockV1) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for KvEncodedBlockV1
impl Serialize for KvEncodedBlockV1
impl StructuralPartialEq for KvEncodedBlockV1
Auto Trait Implementations§
impl Freeze for KvEncodedBlockV1
impl RefUnwindSafe for KvEncodedBlockV1
impl Send for KvEncodedBlockV1
impl Sync for KvEncodedBlockV1
impl Unpin for KvEncodedBlockV1
impl UnsafeUnpin for KvEncodedBlockV1
impl UnwindSafe for KvEncodedBlockV1
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.