pub struct TMinusEvent {
pub id: Uuid,
pub kind: EventKind,
pub scheduled_at: DateTime<Utc>,
pub t_minus: Duration,
pub organizer: AgentId,
pub attendees: Vec<(AgentId, ResponseStatus)>,
pub quorum: usize,
pub payload: Value,
}Expand description
A T-minus countdown event for agent coordination.
Fields§
§id: Uuid§kind: EventKind§scheduled_at: DateTime<Utc>§t_minus: Duration§organizer: AgentId§attendees: Vec<(AgentId, ResponseStatus)>§quorum: usize§payload: ValueImplementations§
Source§impl TMinusEvent
impl TMinusEvent
Sourcepub fn has_quorum(&self) -> bool
pub fn has_quorum(&self) -> bool
Whether the event has reached quorum (enough confirmations).
Sourcepub fn confirmed_count(&self) -> usize
pub fn confirmed_count(&self) -> usize
Count of confirmed attendees.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Count of pending attendees.
Sourcepub fn is_fired(&self, now: DateTime<Utc>) -> bool
pub fn is_fired(&self, now: DateTime<Utc>) -> bool
Whether the event has fired (fire time has passed and quorum met).
Sourcepub fn is_missed(&self, now: DateTime<Utc>) -> bool
pub fn is_missed(&self, now: DateTime<Utc>) -> bool
Whether the event has been missed (fire time passed without quorum).
Sourcepub fn time_remaining(&self, now: DateTime<Utc>) -> Duration
pub fn time_remaining(&self, now: DateTime<Utc>) -> Duration
Time remaining until fire time.
Trait Implementations§
Source§impl Clone for TMinusEvent
impl Clone for TMinusEvent
Source§fn clone(&self) -> TMinusEvent
fn clone(&self) -> TMinusEvent
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 TMinusEvent
impl Debug for TMinusEvent
Source§impl<'de> Deserialize<'de> for TMinusEvent
impl<'de> Deserialize<'de> for TMinusEvent
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
Auto Trait Implementations§
impl Freeze for TMinusEvent
impl RefUnwindSafe for TMinusEvent
impl Send for TMinusEvent
impl Sync for TMinusEvent
impl Unpin for TMinusEvent
impl UnsafeUnpin for TMinusEvent
impl UnwindSafe for TMinusEvent
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