pub struct ResearchEventV1 {
pub schema: String,
pub project_id: String,
pub project_revision: u64,
pub run_id: Option<String>,
pub sequence: u64,
pub event_type: String,
pub payload_digest: String,
pub observed_at_ms: u64,
pub event_digest: String,
}Expand description
Digest-only research event projection for Desktop and other hosts.
Fields§
§schema: String§project_id: String§project_revision: u64§run_id: Option<String>§sequence: u64§event_type: String§payload_digest: String§observed_at_ms: u64§event_digest: StringImplementations§
Source§impl ResearchEventV1
impl ResearchEventV1
pub fn new( project_id: impl Into<String>, project_revision: u64, run_id: Option<String>, sequence: u64, event_type: impl Into<String>, payload_digest: impl Into<String>, observed_at_ms: u64, ) -> Result<Self, ResearchContractError>
pub fn validate(&self) -> Result<(), ResearchContractError>
Sourcepub fn from_slice(bytes: &[u8]) -> Result<Self, ResearchContractError>
pub fn from_slice(bytes: &[u8]) -> Result<Self, ResearchContractError>
Decode a bounded JSON research event and validate its identity before returning it to a caller at a process boundary.
Sourcepub fn to_vec(&self) -> Result<Vec<u8>, ResearchContractError>
pub fn to_vec(&self) -> Result<Vec<u8>, ResearchContractError>
Encode a validated research event for a process boundary.
Sourcepub fn from_core_event(
project_id: impl Into<String>,
project_revision: u64,
event: &CoreEventIdentity,
) -> Result<Self, ResearchContractError>
pub fn from_core_event( project_id: impl Into<String>, project_revision: u64, event: &CoreEventIdentity, ) -> Result<Self, ResearchContractError>
Project one Core event into the research event view.
Core evidence cursors are zero-based because they align with retained
RunEventRecord sequences. The research wire contract is intentionally
one-based, so this adapter performs the only explicit representation
conversion while preserving the operation id, payload digest, and
observation time. Research event names are dotted by contract, so the
runtime name is placed under the explicit code namespace and runtime
underscores are normalized to the research contract’s hyphens.
Sourcepub fn from_core_event_for_run(
project_id: impl Into<String>,
project_revision: u64,
run_id: impl Into<String>,
event: &CoreEventIdentity,
) -> Result<Self, ResearchContractError>
pub fn from_core_event_for_run( project_id: impl Into<String>, project_revision: u64, run_id: impl Into<String>, event: &CoreEventIdentity, ) -> Result<Self, ResearchContractError>
Project a Core event while supplying the actual Code Run identity.
CoreEventIdentity::operation_id is intentionally opaque and may
represent a session-scoped operation rather than the bare Run id.
Research projections must therefore use this explicit adapter whenever
a host has the owning ExecutionTargetV1 available.
Trait Implementations§
Source§impl Clone for ResearchEventV1
impl Clone for ResearchEventV1
Source§fn clone(&self) -> ResearchEventV1
fn clone(&self) -> ResearchEventV1
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 ResearchEventV1
impl Debug for ResearchEventV1
Source§impl<'de> Deserialize<'de> for ResearchEventV1
impl<'de> Deserialize<'de> for ResearchEventV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ResearchEventV1
Source§impl PartialEq for ResearchEventV1
impl PartialEq for ResearchEventV1
Source§impl Serialize for ResearchEventV1
impl Serialize for ResearchEventV1
impl StructuralPartialEq for ResearchEventV1
Auto Trait Implementations§
impl Freeze for ResearchEventV1
impl RefUnwindSafe for ResearchEventV1
impl Send for ResearchEventV1
impl Sync for ResearchEventV1
impl Unpin for ResearchEventV1
impl UnsafeUnpin for ResearchEventV1
impl UnwindSafe for ResearchEventV1
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
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<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.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
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> ⓘ
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