pub struct Decision {
pub reason: String,
pub status: Status,
pub request: Option<String>,
pub error: Option<String>,
pub retry_safe: bool,
pub source_answer_at: Option<Timestamp>,
pub legacy_settled: bool,
pub history: Vec<Event>,
}Expand description
Durable decision state embedded in an inquiry.
Fields§
§reason: StringConcise reason shown on a phone without opening the conversation.
status: StatusCurrent effect status.
request: Option<String>Recorded owner request; migration never manufactures one.
error: Option<String>Current actionable error, including uncertainty about an external call.
retry_safe: boolThe consumer proved that the last attempt failed before any effect.
source_answer_at: Option<Timestamp>Exact source response generation accepted by a fresh owner command. Migration never fills this field from a saved reply.
legacy_settled: boolExplicit owner confirmation that an accepted legacy effect has no remaining work. Operational source readers must not consume it again.
history: Vec<Event>Complete lifecycle history; never pruned by delivery or read receipts.
Implementations§
Source§impl Decision
impl Decision
Sourcepub fn accept(&mut self, request: &str) -> Result<bool>
pub fn accept(&mut self, request: &str) -> Result<bool>
Record acceptance, without claiming that the command has been applied.
Sourcepub fn start(&mut self) -> Result<bool>
pub fn start(&mut self) -> Result<bool>
The consumer begins the accepted effect; no automatic retry of uncertainty.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Decision
impl<'de> Deserialize<'de> for Decision
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 Decision
impl StructuralPartialEq for Decision
Auto Trait Implementations§
impl Forget for Decision
impl Freeze for Decision
impl Move for Decision
impl RefUnwindSafe for Decision
impl Send for Decision
impl Sync for Decision
impl Unpin for Decision
impl UnsafeUnpin for Decision
impl UnwindSafe for Decision
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,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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