pub struct HistoryEvent {
pub timestamp: DateTime<Utc>,
pub event_type: HistoryEventType,
pub data: Option<Value>,
}Expand description
A single event in the loop history.
Fields§
§timestamp: DateTime<Utc>Timestamp when the event occurred.
event_type: HistoryEventTypeType of the event.
data: Option<Value>Optional additional data.
Implementations§
Source§impl HistoryEvent
impl HistoryEvent
Sourcepub fn new(event_type: HistoryEventType) -> Self
pub fn new(event_type: HistoryEventType) -> Self
Create a new history event with current timestamp.
Sourcepub fn with_data(event_type: HistoryEventType, data: Value) -> Self
pub fn with_data(event_type: HistoryEventType, data: Value) -> Self
Create a new history event with data.
Trait Implementations§
Source§impl Clone for HistoryEvent
impl Clone for HistoryEvent
Source§fn clone(&self) -> HistoryEvent
fn clone(&self) -> HistoryEvent
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 HistoryEvent
impl Debug for HistoryEvent
Source§impl<'de> Deserialize<'de> for HistoryEvent
impl<'de> Deserialize<'de> for HistoryEvent
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 HistoryEvent
impl RefUnwindSafe for HistoryEvent
impl Send for HistoryEvent
impl Sync for HistoryEvent
impl Unpin for HistoryEvent
impl UnwindSafe for HistoryEvent
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