pub struct ContextPlan {Show 15 fields
pub schema: String,
pub plan_id: ContentDigest,
pub operation_id: String,
pub step_id: String,
pub state_digest: ContentDigest,
pub state_generation: u64,
pub runtime_inputs: ContentDigest,
pub policy_digest: ContentDigest,
pub provider_profile_digest: ContentDigest,
pub measurement_fingerprints: Vec<ContentDigest>,
pub selections: Vec<ContextSelection>,
pub input_budget_tokens: u32,
pub projected_tokens: u32,
pub pressure_ppm: u32,
pub cache_prefix: Option<CachePrefixBoundary>,
}Expand description
A deterministic runtime decision. It is not a mutable copy of ContextState.
Fields§
§schema: String§plan_id: ContentDigest§operation_id: String§step_id: String§state_digest: ContentDigest§state_generation: u64§runtime_inputs: ContentDigest§policy_digest: ContentDigest§provider_profile_digest: ContentDigest§measurement_fingerprints: Vec<ContentDigest>§selections: Vec<ContextSelection>§input_budget_tokens: u32§projected_tokens: u32§pressure_ppm: u32§cache_prefix: Option<CachePrefixBoundary>Implementations§
Source§impl ContextPlan
impl ContextPlan
pub fn new( operation_id: impl Into<String>, step_id: impl Into<String>, state: &ContextState, policy_digest: ContentDigest, provider_profile_digest: ContentDigest, measurement_fingerprints: Vec<ContentDigest>, selections: Vec<ContextSelection>, input_budget_tokens: u32, projected_tokens: u32, pressure_ppm: u32, cache_prefix: Option<CachePrefixBoundary>, runtime_inputs: ContentDigest, ) -> Result<ContextPlan, ContextContractError>
pub fn verify(&self, state: &ContextState) -> Result<(), ContextContractError>
pub fn verify_digest(&self) -> Result<(), ContextContractError>
Trait Implementations§
Source§impl Clone for ContextPlan
impl Clone for ContextPlan
Source§fn clone(&self) -> ContextPlan
fn clone(&self) -> ContextPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextPlan
impl Debug for ContextPlan
Source§impl<'de> Deserialize<'de> for ContextPlan
impl<'de> Deserialize<'de> for ContextPlan
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextPlan
Source§impl PartialEq for ContextPlan
impl PartialEq for ContextPlan
Source§impl Serialize for ContextPlan
impl Serialize for ContextPlan
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ContextPlan
Auto Trait Implementations§
impl Freeze for ContextPlan
impl RefUnwindSafe for ContextPlan
impl Send for ContextPlan
impl Sync for ContextPlan
impl Unpin for ContextPlan
impl UnsafeUnpin for ContextPlan
impl UnwindSafe for ContextPlan
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.