#[non_exhaustive]pub enum KvRole {
Key,
Value,
Fused,
}Expand description
KV-cache role for a block-paged tensor.
The wire value is a uint8 in the additional descriptor fields of a
block-paged layout (see docs/spec/layouts/block-paged.md § Additional Descriptor Fields).
§Examples
use hurray_core::layout::KvRole;
assert_eq!(KvRole::Key.wire_byte(), 0x00);
assert_eq!(KvRole::Value.wire_byte(), 0x01);
assert_eq!(KvRole::Fused.wire_byte(), 0x02);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Key
Key tensor (kv_role = 0x00).
Value
Value tensor (kv_role = 0x01).
Fused
Fused or non-KV generic tensor (kv_role = 0x02).
Implementations§
Trait Implementations§
impl Copy for KvRole
impl Eq for KvRole
impl StructuralPartialEq for KvRole
Auto Trait Implementations§
impl Freeze for KvRole
impl RefUnwindSafe for KvRole
impl Send for KvRole
impl Sync for KvRole
impl Unpin for KvRole
impl UnsafeUnpin for KvRole
impl UnwindSafe for KvRole
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