pub struct PreparedConditioningSnapshot {
pub profile_id: String,
pub profile_version: u32,
pub spec_identity: u64,
pub evidence_revision: u64,
pub access_scope: u64,
pub model_instance: u64,
pub adapter_hash: u64,
pub tokenizer_revision: u64,
pub actual_input_tokens: u32,
pub reserved_output_tokens: u32,
pub exact_tokens: Vec<u32>,
}Expand description
Snapshot of a fully validated and admitted conditioning request ready for execution.
Fields§
§profile_id: String§profile_version: u32§spec_identity: u64§evidence_revision: u64§access_scope: u64§model_instance: u64§adapter_hash: u64§tokenizer_revision: u64§actual_input_tokens: u32§reserved_output_tokens: u32§exact_tokens: Vec<u32>Implementations§
Source§impl PreparedConditioningSnapshot
impl PreparedConditioningSnapshot
Sourcepub fn prepare(
profile_id: impl Into<String>,
profile_version: u32,
spec_identity: u64,
evidence_revision: u64,
access_scope: u64,
model_instance: u64,
adapter_hash: u64,
tokenizer_revision: u64,
exact_tokens: Vec<u32>,
raw_rendered_bytes: usize,
max_bytes: usize,
max_input_tokens: u32,
reserved_output_tokens: u32,
thinking_token_budget: Option<u32>,
supported_context_tokens: u32,
) -> Result<Self, ConditioningError>
pub fn prepare( profile_id: impl Into<String>, profile_version: u32, spec_identity: u64, evidence_revision: u64, access_scope: u64, model_instance: u64, adapter_hash: u64, tokenizer_revision: u64, exact_tokens: Vec<u32>, raw_rendered_bytes: usize, max_bytes: usize, max_input_tokens: u32, reserved_output_tokens: u32, thinking_token_budget: Option<u32>, supported_context_tokens: u32, ) -> Result<Self, ConditioningError>
Create and validate a prepared request snapshot against exact context ceilings.
Fails closed with ContextBudgetExceeded if:
- rendered tokens exceed
max_input_tokens - rendered bytes exceed
max_bytes - total tokens (
actual_input_tokens + reserved_output_tokens + thinking_token_budget) exceedsupported_context_tokens
Sourcepub fn derive_cache_key(
&self,
kv_floats: usize,
n_layers: usize,
) -> InferenceCacheKey
pub fn derive_cache_key( &self, kv_floats: usize, n_layers: usize, ) -> InferenceCacheKey
Derive the Tier-1 prefix cache key for this prepared request.
Sourcepub fn is_compatible_with(&self, other: &Self) -> bool
pub fn is_compatible_with(&self, other: &Self) -> bool
Check compatibility with another snapshot (for cache namespace and session binding).
Trait Implementations§
Source§impl Clone for PreparedConditioningSnapshot
impl Clone for PreparedConditioningSnapshot
Source§impl Debug for PreparedConditioningSnapshot
impl Debug for PreparedConditioningSnapshot
impl Eq for PreparedConditioningSnapshot
impl StructuralPartialEq for PreparedConditioningSnapshot
Auto Trait Implementations§
impl Freeze for PreparedConditioningSnapshot
impl RefUnwindSafe for PreparedConditioningSnapshot
impl Send for PreparedConditioningSnapshot
impl Sync for PreparedConditioningSnapshot
impl Unpin for PreparedConditioningSnapshot
impl UnsafeUnpin for PreparedConditioningSnapshot
impl UnwindSafe for PreparedConditioningSnapshot
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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