pub struct SpeculativeStepOutcome {
pub tokens: Vec<TokenId>,
pub draft_kv: Arc<dyn KvCacheHandle>,
pub target_kv: Arc<dyn KvCacheHandle>,
pub rejected: bool,
pub rejected_at: usize,
pub draft_catchup_token: Option<TokenId>,
}Expand description
Result of a single SpeculativeRunner::step.
Fields§
§tokens: Vec<TokenId>§draft_kv: Arc<dyn KvCacheHandle>§target_kv: Arc<dyn KvCacheHandle>§rejected: boolTrue when a draft was rejected (caller may want to roll target KV
back to rejected_at to stay token-aligned with the draft model).
rejected_at: usize§draft_catchup_token: Option<TokenId>Draft KV is N writes; target KV is N+1 writes. In the full-accept
case the draft is exactly one position behind target. Caller
catches up by feeding this token (the final draft input to target,
i.e. draft_tokens[N-1]) into the draft executor once. None on
rejection (caller handles rollback separately).
Auto Trait Implementations§
impl !RefUnwindSafe for SpeculativeStepOutcome
impl !UnwindSafe for SpeculativeStepOutcome
impl Freeze for SpeculativeStepOutcome
impl Send for SpeculativeStepOutcome
impl Sync for SpeculativeStepOutcome
impl Unpin for SpeculativeStepOutcome
impl UnsafeUnpin for SpeculativeStepOutcome
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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