pub struct LogicalSeq {
pub id: String,
pub page_ixs: Vec<u32>,
pub fill_in_last_page: u32,
}Expand description
One logical request (sequence) in the cache, mapping its token positions onto a list of physical pages. Preserved across snapshot/restore so prefix-sharing (vLLM PagedAttention, SGLang RadixAttention) survives.
Fields§
§id: StringStable identifier for this sequence.
page_ixs: Vec<u32>Ordered list of physical-page indices the sequence occupies.
fill_in_last_page: u32How many of page_size_tokens slots in the LAST page are occupied.
0 means the last page is full and the next token starts a new page.
Trait Implementations§
Source§impl Clone for LogicalSeq
impl Clone for LogicalSeq
Source§fn clone(&self) -> LogicalSeq
fn clone(&self) -> LogicalSeq
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 LogicalSeq
impl Debug for LogicalSeq
Source§impl<'de> Deserialize<'de> for LogicalSeq
impl<'de> Deserialize<'de> for LogicalSeq
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 LogicalSeq
impl PartialEq for LogicalSeq
Source§impl Serialize for LogicalSeq
impl Serialize for LogicalSeq
impl Eq for LogicalSeq
impl StructuralPartialEq for LogicalSeq
Auto Trait Implementations§
impl Freeze for LogicalSeq
impl RefUnwindSafe for LogicalSeq
impl Send for LogicalSeq
impl Sync for LogicalSeq
impl Unpin for LogicalSeq
impl UnsafeUnpin for LogicalSeq
impl UnwindSafe for LogicalSeq
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