pub struct TriggerBinding {
pub id: String,
pub revision: u64,
pub source: String,
pub event_type: String,
pub instance_id: InstanceId,
pub predicate: Value,
pub ordering: OrderingPolicy,
pub starts_at: Option<DateTime<Utc>>,
pub expires_at: Option<DateTime<Utc>>,
pub gap_wait_ms: u64,
pub gap_limit: u32,
}Expand description
Subscription of an instance to a source event type, with a JSON-containment predicate.
Fields§
§id: StringStable identifier of this record.
revision: u64Monotonic revision number.
source: StringSource the binding subscribes to.
event_type: StringStable machine-readable event type.
instance_id: InstanceIdWorkflow instance this record refers to.
predicate: ValueJSON object the event payload must contain (@>) to create a delivery.
ordering: OrderingPolicyHow out-of-order source sequences are handled.
starts_at: Option<DateTime<Utc>>Earliest time the binding or instance is active.
expires_at: Option<DateTime<Utc>>When the record stops being valid.
gap_wait_ms: u64How long a missing source sequence may block before it is reported as a gap.
gap_limit: u32Maximum buffered out-of-order deliveries before the source is blocked.
Implementations§
Source§impl TriggerBinding
impl TriggerBinding
Sourcepub fn validate(&self) -> Result<(), ContractError>
pub fn validate(&self) -> Result<(), ContractError>
Reject blank identifiers, out-of-range gap settings and inverted windows.
Trait Implementations§
Source§impl Clone for TriggerBinding
impl Clone for TriggerBinding
Source§fn clone(&self) -> TriggerBinding
fn clone(&self) -> TriggerBinding
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 TriggerBinding
impl Debug for TriggerBinding
Source§impl<'de> Deserialize<'de> for TriggerBinding
impl<'de> Deserialize<'de> for TriggerBinding
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 PartialEq for TriggerBinding
impl PartialEq for TriggerBinding
Source§impl Serialize for TriggerBinding
impl Serialize for TriggerBinding
impl StructuralPartialEq for TriggerBinding
Auto Trait Implementations§
impl Freeze for TriggerBinding
impl RefUnwindSafe for TriggerBinding
impl Send for TriggerBinding
impl Sync for TriggerBinding
impl Unpin for TriggerBinding
impl UnsafeUnpin for TriggerBinding
impl UnwindSafe for TriggerBinding
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