pub struct SisterEvent {
pub id: EventId,
pub sister_type: SisterType,
pub event_type: EventType,
pub timestamp: DateTime<Utc>,
pub context_id: Option<ContextId>,
}Expand description
Event emitted by a sister.
Fields§
§id: EventIdUnique event ID.
sister_type: SisterTypeWhich sister emitted this.
event_type: EventTypeEvent type and data.
timestamp: DateTime<Utc>Timestamp.
context_id: Option<ContextId>Context this event occurred in (if applicable).
Implementations§
Source§impl SisterEvent
impl SisterEvent
Sourcepub fn new(sister_type: SisterType, event_type: EventType) -> Self
pub fn new(sister_type: SisterType, event_type: EventType) -> Self
Create a new event.
Sourcepub fn in_context(self, context_id: ContextId) -> Self
pub fn in_context(self, context_id: ContextId) -> Self
Add context ID.
pub fn ready(sister_type: SisterType) -> Self
pub fn shutting_down(sister_type: SisterType) -> Self
pub fn status_changed(sister_type: SisterType, from: Status, to: Status) -> Self
pub fn context_created( sister_type: SisterType, context_id: ContextId, name: String, ) -> Self
pub fn context_switched( sister_type: SisterType, from: ContextId, to: ContextId, ) -> Self
pub fn operation_started( sister_type: SisterType, operation_id: impl Into<String>, operation_type: impl Into<String>, ) -> Self
pub fn operation_completed( sister_type: SisterType, operation_id: impl Into<String>, duration: Duration, ) -> Self
pub fn operation_failed( sister_type: SisterType, operation_id: impl Into<String>, error: &SisterError, ) -> Self
pub fn evidence_created( sister_type: SisterType, evidence_id: impl Into<String>, evidence_type: EvidenceType, ) -> Self
pub fn grounding_performed( sister_type: SisterType, grounding_id: impl Into<String>, grounded: bool, confidence: f64, ) -> Self
Trait Implementations§
Source§impl Clone for SisterEvent
impl Clone for SisterEvent
Source§fn clone(&self) -> SisterEvent
fn clone(&self) -> SisterEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 SisterEvent
impl Debug for SisterEvent
Source§impl<'de> Deserialize<'de> for SisterEvent
impl<'de> Deserialize<'de> for SisterEvent
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 SisterEvent
impl RefUnwindSafe for SisterEvent
impl Send for SisterEvent
impl Sync for SisterEvent
impl Unpin for SisterEvent
impl UnsafeUnpin for SisterEvent
impl UnwindSafe for SisterEvent
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