pub struct MandateRunNotification {Show 14 fields
pub mandate_id: String,
pub mandate_version: i64,
pub goal_id: String,
pub goal_run_id: String,
pub owner_session_id: String,
pub kind: MandateRunNotificationKind,
pub counts: MandateRunProofCounts,
pub created_at: String,
pub owner_question: Option<String>,
pub owner_alert: Option<String>,
pub objective: Option<String>,
pub name: Option<String>,
pub published_links: Vec<String>,
pub objective_summary: Option<MandateObjectiveNoticeSummary>,
}Fields§
§mandate_id: String§mandate_version: i64§goal_id: String§goal_run_id: String§owner_session_id: String§kind: MandateRunNotificationKind§counts: MandateRunProofCounts§created_at: String§owner_question: Option<String>The deliberator’s ASK question, shown to the owner so they can
answer from chat. Rendered through owner_question_excerpt.
owner_alert: Option<String>The WAIT’s owner alert, rendered through owner_question_excerpt
(the same bounding, quoted and attributed).
objective: Option<String>The owner-confirmed objective, so the notice names the automation the
owner recognizes instead of an opaque id. Rendered through
mandate_owner_label.
name: Option<String>The short name the owner gave the mandate, which the notice uses before the objective.
published_links: Vec<String>Links to what this run published, built by
canonical_published_link from the receipts’ canonical ids.
objective_summary: Option<MandateObjectiveNoticeSummary>The measured objective’s latest credible reading.
Implementations§
Source§impl MandateRunNotification
impl MandateRunNotification
pub fn new( mandate_id: &str, mandate_version: i64, goal_id: &str, goal_run_id: &str, owner_session_id: &str, kind: MandateRunNotificationKind, counts: MandateRunProofCounts, created_at: &str, ) -> Self
Sourcepub fn with_published_links(self, links: Vec<String>) -> Self
pub fn with_published_links(self, links: Vec<String>) -> Self
Keeps only canonical links, at most MAX_NOTICE_PUBLISHED_LINKS.
pub fn with_objective_summary( self, summary: Option<MandateObjectiveNoticeSummary>, ) -> Self
pub fn with_objective(self, objective: Option<&str>) -> Self
pub fn with_name(self, name: Option<&str>) -> Self
pub fn with_owner_question(self, question: Option<&str>) -> Self
pub fn with_owner_alert(self, alert: Option<&str>) -> Self
pub fn validate(&self) -> Result<(), String>
Sourcepub fn notification_id(&self) -> String
pub fn notification_id(&self) -> String
Stable primary key: exactly one terminal owner notice can exist for a mandate run, even if finalization is retried after a crash.
Sourcepub fn message(&self) -> String
pub fn message(&self) -> String
The notice as the owner reads it: the mandate by its name, what happened in plain words, and no internal codes or ids (the owner’s next turn finds the mandate by name, or from the typed notice).
pub fn to_notification_entry(&self) -> NotificationEntry
Trait Implementations§
Source§impl Clone for MandateRunNotification
impl Clone for MandateRunNotification
Source§impl Debug for MandateRunNotification
impl Debug for MandateRunNotification
Source§impl<'de> Deserialize<'de> for MandateRunNotification
impl<'de> Deserialize<'de> for MandateRunNotification
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 MandateRunNotification
Source§impl PartialEq for MandateRunNotification
impl PartialEq for MandateRunNotification
Source§impl Serialize for MandateRunNotification
impl Serialize for MandateRunNotification
impl StructuralPartialEq for MandateRunNotification
Auto Trait Implementations§
impl Forget for MandateRunNotification
impl Freeze for MandateRunNotification
impl Move for MandateRunNotification
impl RefUnwindSafe for MandateRunNotification
impl Send for MandateRunNotificationwhere
RawVecInner: Send,
impl Sync for MandateRunNotificationwhere
RawVecInner: Sync,
impl Unpin for MandateRunNotification
impl UnsafeUnpin for MandateRunNotificationwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for MandateRunNotificationwhere
RawVecInner: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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