pub struct PlanRuntimePrefixRestoreOutput { /* private fields */ }Expand description
Independently restored state whose execution gate remains closed while the engine installs its physical cache authority and advances scheduler progress.
The executor callback owns the native publication guard. Dropping this value must drop that guard and cancel its exact target; the callback must never retain only a request id or a later registry lookup. No logits are cached: at least one remaining prompt token must execute before sampling.
Implementations§
Source§impl PlanRuntimePrefixRestoreOutput
impl PlanRuntimePrefixRestoreOutput
Sourcepub fn new(
request_id: RequestId,
restored_tokens: usize,
prompt_tokens: usize,
kv_cache: Arc<dyn KvCacheHandle>,
acknowledge: impl FnOnce() -> Result<()> + Send + 'static,
) -> Result<Self>
pub fn new( request_id: RequestId, restored_tokens: usize, prompt_tokens: usize, kv_cache: Arc<dyn KvCacheHandle>, acknowledge: impl FnOnce() -> Result<()> + Send + 'static, ) -> Result<Self>
Implementer constructor. The callback must own and acknowledge the exact native restoration, revalidating cancellation and target identity. Rejected construction drops the callback and its retained guard.
pub fn request_id(&self) -> &RequestId
pub fn restored_tokens(&self) -> usize
pub fn kv_cache(&self) -> &Arc<dyn KvCacheHandle> ⓘ
pub fn validate_for( &self, request_id: &RequestId, prompt_tokens: usize, ) -> Result<()>
Sourcepub fn acknowledge(self) -> Result<PlanRuntimePrefillAuthority>
pub fn acknowledge(self) -> Result<PlanRuntimePrefillAuthority>
Opens the native execution gate only after outer progress is installed. An error requires cancellation of the corresponding outer request; it does not authorize falling back to execution on the restored target.