pub struct KvSlot {
pub request_id: u64,
pub kv_cache_idx: usize,
pub position: usize,
}Expand description
A single request’s slot within the shared KV pool.
Each in-flight request receives one KvSlot that identifies which
position in the KV pool belongs to it. The slot is released back to the
pool when the request finishes (EOS or max-token limit reached).
Fields§
§request_id: u64Unique identifier of the request that owns this slot.
kv_cache_idx: usizeIndex into the shared KV cache pool (e.g. the row within a paged KV cache or the sequence slot index in a flat pool).
position: usizeCurrent sequence position (number of tokens committed so far).
Implementations§
Trait Implementations§
impl Copy for KvSlot
impl Eq for KvSlot
impl StructuralPartialEq for KvSlot
Auto Trait Implementations§
impl Freeze for KvSlot
impl RefUnwindSafe for KvSlot
impl Send for KvSlot
impl Sync for KvSlot
impl Unpin for KvSlot
impl UnsafeUnpin for KvSlot
impl UnwindSafe for KvSlot
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more