pub enum TraceEntry {
Suspend(Effect),
Resume {
stage: Name,
response: StageResponse,
},
Clock(Instant),
Input {
stage: Name,
input: Box<dyn SendData>,
},
State {
stage: Name,
state: Box<dyn SendData>,
},
Terminated {
stage: Name,
reason: TerminationReason,
},
}Expand description
An owned entry can be serialized and deserialized.
However, we need the entries in the continuation of the running program and we cannot clone,
so there is a variant of this enum with the very same structure the captures only references
to work around this problem: TraceEntryRef.
Variants§
Implementations§
Source§impl TraceEntry
impl TraceEntry
Sourcepub fn resume(stage: impl AsRef<str>, response: StageResponse) -> Self
pub fn resume(stage: impl AsRef<str>, response: StageResponse) -> Self
Construct a resume entry.
Sourcepub fn input(stage: impl AsRef<str>, input: Box<dyn SendData>) -> Self
pub fn input(stage: impl AsRef<str>, input: Box<dyn SendData>) -> Self
Construct an input entry.
Sourcepub fn state(stage: impl AsRef<str>, state: Box<dyn SendData>) -> Self
pub fn state(stage: impl AsRef<str>, state: Box<dyn SendData>) -> Self
Construct a state entry.
Sourcepub fn terminated(stage: impl AsRef<str>, reason: TerminationReason) -> Self
pub fn terminated(stage: impl AsRef<str>, reason: TerminationReason) -> Self
Construct a terminated entry.
pub fn at_stage<'a, 'b: 'a>(&'b self) -> Option<&'a Name>
Trait Implementations§
Source§impl Debug for TraceEntry
impl Debug for TraceEntry
Source§impl<'de> Deserialize<'de> for TraceEntry
impl<'de> Deserialize<'de> for TraceEntry
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
Source§impl Display for TraceEntry
impl Display for TraceEntry
Source§impl PartialEq for TraceEntry
impl PartialEq for TraceEntry
Source§fn eq(&self, other: &TraceEntry) -> bool
fn eq(&self, other: &TraceEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TraceEntry
impl Serialize for TraceEntry
impl StructuralPartialEq for TraceEntry
Auto Trait Implementations§
impl !RefUnwindSafe for TraceEntry
impl !Sync for TraceEntry
impl !UnwindSafe for TraceEntry
impl Freeze for TraceEntry
impl Send for TraceEntry
impl Unpin for TraceEntry
impl UnsafeUnpin for TraceEntry
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
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