pub struct ExecutionIdentity {
pub producer: ExecutionProducerIdentity,
pub backend: String,
pub backend_version: String,
pub build_identity: String,
pub runtime_config: String,
pub native_identity: Option<NativeExecutionIdentity>,
}Expand description
Runtime execution identity shared by evidence-producing extensions.
This records what executed a result. It is intentionally generic: CVC5, Cedar analysis, OR-Tools, HiGHS, model inference, and deterministic fake backends can all populate the same contract without leaking implementation fields into domain payloads.
Fields§
§producer: ExecutionProducerIdentityProducer crate, extension, or service.
backend: StringLogical backend or engine name, for example cvc5 or cp-sat-v9.15.
backend_version: StringBackend version visible at the safe execution boundary.
build_identity: StringBuild/source/config identity for replay and audit.
runtime_config: StringRuntime options that affect the result.
native_identity: Option<NativeExecutionIdentity>Native backend details when the execution crossed an FFI/native boundary.
Implementations§
Source§impl ExecutionIdentity
impl ExecutionIdentity
Sourcepub fn new(
producer: ExecutionProducerIdentity,
backend: impl Into<String>,
backend_version: impl Into<String>,
build_identity: impl Into<String>,
runtime_config: impl Into<String>,
native_identity: Option<NativeExecutionIdentity>,
) -> ExecutionIdentity
pub fn new( producer: ExecutionProducerIdentity, backend: impl Into<String>, backend_version: impl Into<String>, build_identity: impl Into<String>, runtime_config: impl Into<String>, native_identity: Option<NativeExecutionIdentity>, ) -> ExecutionIdentity
Creates execution identity metadata.
Sourcepub fn non_native(
producer_name: impl Into<String>,
producer_version: impl Into<String>,
backend: impl Into<String>,
runtime_config: impl Into<String>,
) -> ExecutionIdentity
pub fn non_native( producer_name: impl Into<String>, producer_version: impl Into<String>, backend: impl Into<String>, runtime_config: impl Into<String>, ) -> ExecutionIdentity
Creates non-native execution identity metadata.
Sourcepub fn unspecified(
producer_name: impl Into<String>,
producer_version: impl Into<String>,
) -> ExecutionIdentity
pub fn unspecified( producer_name: impl Into<String>, producer_version: impl Into<String>, ) -> ExecutionIdentity
Creates unknown execution identity metadata for placeholders and tests.
Sourcepub fn runtime_config_from_typed<T>(value: &T) -> Stringwhere
T: Serialize,
pub fn runtime_config_from_typed<T>(value: &T) -> Stringwhere
T: Serialize,
Serializes a typed configuration struct to the canonical
runtime_config JSON string.
This is the workspace-standard encoding for runtime_config per
kb/Standards/Runtime Config Encoding.md: a JSON object whose keys
are the struct field names and whose values are field values. Empty
configs serialize as {}.
Panics if T’s Serialize impl is malformed (e.g., non-finite
floats, non-string map keys). For all practical workspace config
structs this is unreachable; a panic here means the caller’s config
struct is broken.
let rc = ExecutionIdentity::runtime_config_from_typed(&my_cfg);
let identity = ExecutionIdentity::non_native("crate", "1.0", "backend", rc);Sourcepub fn with_runtime_config_typed<T>(self, value: &T) -> ExecutionIdentitywhere
T: Serialize,
pub fn with_runtime_config_typed<T>(self, value: &T) -> ExecutionIdentitywhere
T: Serialize,
Replaces this identity’s runtime_config with the JSON encoding of a
typed config struct. Builder-style sibling of
Self::runtime_config_from_typed.
Trait Implementations§
Source§impl Clone for ExecutionIdentity
impl Clone for ExecutionIdentity
Source§fn clone(&self) -> ExecutionIdentity
fn clone(&self) -> ExecutionIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionIdentity
impl Debug for ExecutionIdentity
Source§impl<'de> Deserialize<'de> for ExecutionIdentity
impl<'de> Deserialize<'de> for ExecutionIdentity
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionIdentity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionIdentity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ExecutionIdentity
impl PartialEq for ExecutionIdentity
Source§fn eq(&self, other: &ExecutionIdentity) -> bool
fn eq(&self, other: &ExecutionIdentity) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ExecutionIdentity
impl Serialize for ExecutionIdentity
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 Eq for ExecutionIdentity
impl StructuralPartialEq for ExecutionIdentity
Auto Trait Implementations§
impl Freeze for ExecutionIdentity
impl RefUnwindSafe for ExecutionIdentity
impl Send for ExecutionIdentity
impl Sync for ExecutionIdentity
impl Unpin for ExecutionIdentity
impl UnsafeUnpin for ExecutionIdentity
impl UnwindSafe for ExecutionIdentity
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> 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.