pub struct PlanKey { /* private fields */ }Expand description
The identity of one lowered plan: every input that determines it.
The three semantics of the contract are separate fields, so an entry lowered under one engine semantics can never be served under another, and a caller cannot reach a key by hashing something: the fields are typed values, not strings to concatenate.
Implementations§
Source§impl PlanKey
impl PlanKey
pub fn new( definition_revision: DefinitionRevision, compiler_semantics: CompilerSemantics, engine_semantics: EngineSemantics, lowering_capabilities: LoweringCapabilities, ) -> PlanKey
Sourcepub fn for_definition(
definition: &WorkflowDefinition,
compiler_semantics: CompilerSemantics,
engine_semantics: EngineSemantics,
lowering_capabilities: LoweringCapabilities,
) -> Result<PlanKey, PlanInputError>
pub fn for_definition( definition: &WorkflowDefinition, compiler_semantics: CompilerSemantics, engine_semantics: EngineSemantics, lowering_capabilities: LoweringCapabilities, ) -> Result<PlanKey, PlanInputError>
The key one definition has under one semantics configuration.
pub fn definition_revision(&self) -> &DefinitionRevision
pub fn compiler_semantics(&self) -> CompilerSemantics
pub fn engine_semantics(&self) -> EngineSemantics
pub fn lowering_capabilities(&self) -> &LoweringCapabilities
Sourcepub fn canonical_bytes(&self, identity: &PlanIdentity) -> Vec<u8> ⓘ
pub fn canonical_bytes(&self, identity: &PlanIdentity) -> Vec<u8> ⓘ
The canonical encoding of every field, in fixed order, under the
binding-identity schema identity binds. Validated tags cannot contain
the separators, so the encoding is unambiguous.
Sourcepub fn binding_digest(&self, identity: &PlanIdentity) -> String
pub fn binding_digest(&self, identity: &PlanIdentity) -> String
The stable identity of this plan under identity’s lines.
It is derived from the key alone, so rebuilding a plan that a cache evicted reproduces this value instead of minting a new one, and a run bound to it stays bound. Two identities digest the same key differently on purpose: their persisted records must never alias.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PlanKey
impl<'de> Deserialize<'de> for PlanKey
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlanKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlanKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for PlanKey
Source§impl From<&PlanKey> for RecordedPlanKey
impl From<&PlanKey> for RecordedPlanKey
Source§fn from(key: &PlanKey) -> RecordedPlanKey
fn from(key: &PlanKey) -> RecordedPlanKey
Records under Acativa’s own identity lines. A host binding other lines
calls RecordedPlanKey::record with its PlanIdentity.
Source§impl Ord for PlanKey
impl Ord for PlanKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for PlanKey
impl PartialOrd for PlanKey
Source§impl Serialize for PlanKey
impl Serialize for PlanKey
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,
impl StructuralPartialEq for PlanKey
Auto Trait Implementations§
impl Forget for PlanKey
impl Freeze for PlanKey
impl Move for PlanKey
impl RefUnwindSafe for PlanKey
impl Send for PlanKey
impl Sync for PlanKey
impl Unpin for PlanKey
impl UnsafeUnpin for PlanKey
impl UnwindSafe for PlanKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.