pub struct PreparedPrefixRestore { /* private fields */ }Expand description
A scheduler-owned preparation, created before asynchronous device work.
The implementation proof is intentionally opaque to the engine. It must bind the exact admission incarnation and logical work generation, rather than authorizing a later lookup by request id alone. Its destructor releases any scheduling hold without committing progress. This value is not Clone or serializable and does not prove that device restoration has completed.
Implementations§
Source§impl PreparedPrefixRestore
impl PreparedPrefixRestore
Sourcepub fn new<T: Any + Send + Sync>(
request_id: RequestId,
expected_offset: usize,
prompt_tokens: usize,
proof: T,
) -> Self
pub fn new<T: Any + Send + Sync>( request_id: RequestId, expected_offset: usize, prompt_tokens: usize, proof: T, ) -> Self
Implementer constructor. The receiving scheduler must validate the private proof type and its identity on every commit.
pub fn request_id(&self) -> &RequestId
pub const fn expected_offset(&self) -> usize
pub const fn prompt_tokens(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PreparedPrefixRestore
impl !UnwindSafe for PreparedPrefixRestore
impl Freeze for PreparedPrefixRestore
impl Send for PreparedPrefixRestore
impl Sync for PreparedPrefixRestore
impl Unpin for PreparedPrefixRestore
impl UnsafeUnpin for PreparedPrefixRestore
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