pub struct SequenceSlot {
pub state: Box<dyn SequenceState>,
pub position: usize,
pub request_id: u64,
}Expand description
A live sequence slot in the SsmStatePool.
Each slot carries:
state: the arch-specificSequenceState(SSM hidden state or an attention position counter wrapped by the arch crate).position: current token position in the sequence (mirrorsstate.step_position(), but accessible without a vtable call).request_id: the logical request ID associated with this slot (matchesSequence::id);0= unassigned.
Fields§
§state: Box<dyn SequenceState>Arch-specific sequence state (SSM hidden vectors, or attention counter).
position: usizeCurrent token position (0-indexed).
request_id: u64Request ID bound to this slot (0 = none).
Implementations§
Source§impl SequenceSlot
impl SequenceSlot
Sourcepub fn new(state: Box<dyn SequenceState>) -> Self
pub fn new(state: Box<dyn SequenceState>) -> Self
Create a new slot with the given state and a zero request ID.
Auto Trait Implementations§
impl Freeze for SequenceSlot
impl !RefUnwindSafe for SequenceSlot
impl !Send for SequenceSlot
impl !Sync for SequenceSlot
impl Unpin for SequenceSlot
impl UnsafeUnpin for SequenceSlot
impl !UnwindSafe for SequenceSlot
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> 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