pub struct TraceInput {
pub schema_version: u32,
pub workflow_id: String,
pub phase: u8,
pub phase_started_at: String,
pub events: Vec<WorkflowEvent>,
}Expand description
One phase-local event window anchored to an existing workflow contract.
Fields§
§schema_version: u32Input schema version.
workflow_id: StringActive workflow ID.
phase: u8Contract phase from 1 to 4.
phase_started_at: StringPhase start time copied from the contract.
events: Vec<WorkflowEvent>Chronologically ordered events, at most 128.
Implementations§
Source§impl TraceInput
impl TraceInput
Sourcepub fn validate(&self, now: &str) -> Result<(), ProgressError>
pub fn validate(&self, now: &str) -> Result<(), ProgressError>
Validate version, bounds, chronology, and every external field.
§Errors
Rejects malformed or potentially sensitive event fields.
Sourcepub fn input_hash(&self) -> Result<String, ProgressError>
pub fn input_hash(&self) -> Result<String, ProgressError>
Stable SHA-256 of the complete typed input, used for replay and duplicate windows.
§Errors
Returns an error if the typed input cannot be serialized.
Trait Implementations§
Source§impl Clone for TraceInput
impl Clone for TraceInput
Source§impl Debug for TraceInput
impl Debug for TraceInput
Source§impl<'de> Deserialize<'de> for TraceInput
impl<'de> Deserialize<'de> for TraceInput
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TraceInput
impl RefUnwindSafe for TraceInput
impl Send for TraceInput
impl Sync for TraceInput
impl Unpin for TraceInput
impl UnsafeUnpin for TraceInput
impl UnwindSafe for TraceInput
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<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> ⓘ
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