pub struct TriggerEvent { /* private fields */ }Expand description
An inbound event that fans out into deliberations.
Implementations§
Source§impl TriggerEvent
impl TriggerEvent
Sourcepub fn new(
envelope: EventEnvelope,
kind: impl Into<String>,
requested_specialties: impl IntoIterator<Item = Specialty>,
task_description_template: Option<TaskDescription>,
constraints: TaskConstraints,
payload: Attributes,
) -> Result<Self, DomainError>
pub fn new( envelope: EventEnvelope, kind: impl Into<String>, requested_specialties: impl IntoIterator<Item = Specialty>, task_description_template: Option<TaskDescription>, constraints: TaskConstraints, payload: Attributes, ) -> Result<Self, DomainError>
Build a trigger event.
Invariants:
kindmust be non-empty after trimming and within length bounds.requested_specialtiesmust be non-empty and deduplicated by the caller is not required — we dedupe here so downstream dispatch cannot double-run a council.
pub fn new_with_context( envelope: EventEnvelope, kind: impl Into<String>, requested_specialties: impl IntoIterator<Item = Specialty>, task_description_template: Option<TaskDescription>, constraints: TaskConstraints, payload: Attributes, external_context: Option<ExternalContextBundle>, ) -> Result<Self, DomainError>
pub fn envelope(&self) -> &EventEnvelope
pub fn kind(&self) -> &str
pub fn requested_specialties(&self) -> &[Specialty]
pub fn task_description_template(&self) -> Option<&TaskDescription>
pub fn constraints(&self) -> &TaskConstraints
pub fn payload(&self) -> &Attributes
pub fn external_context(&self) -> Option<&ExternalContextBundle>
Trait Implementations§
Source§impl Clone for TriggerEvent
impl Clone for TriggerEvent
Source§fn clone(&self) -> TriggerEvent
fn clone(&self) -> TriggerEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TriggerEvent
impl Debug for TriggerEvent
Source§impl<'de> Deserialize<'de> for TriggerEvent
impl<'de> Deserialize<'de> for TriggerEvent
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
impl Eq for TriggerEvent
Source§impl PartialEq for TriggerEvent
impl PartialEq for TriggerEvent
Source§impl Serialize for TriggerEvent
impl Serialize for TriggerEvent
impl StructuralPartialEq for TriggerEvent
Auto Trait Implementations§
impl Freeze for TriggerEvent
impl RefUnwindSafe for TriggerEvent
impl Send for TriggerEvent
impl Sync for TriggerEvent
impl Unpin for TriggerEvent
impl UnsafeUnpin for TriggerEvent
impl UnwindSafe for TriggerEvent
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