pub struct BaseEvent {
pub timestamp: Option<f64>,
pub raw_event: Option<JsonValue>,
}Expand description
Base event structure for all AG-UI protocol events.
Contains common fields that are present in all event types. Individual event structs flatten this into their structure.
§Fields
timestamp: Optional Unix timestamp in milliseconds since epochraw_event: Optional raw event from the underlying provider (for debugging/passthrough)
§Example
use ag_ui_core::event::BaseEvent;
let base = BaseEvent {
timestamp: Some(1706123456789.0),
raw_event: None,
};Fields§
§timestamp: Option<f64>Unix timestamp in milliseconds since epoch.
raw_event: Option<JsonValue>Raw event from the underlying provider (for debugging/passthrough).
Implementations§
Source§impl BaseEvent
impl BaseEvent
Sourcepub fn with_current_timestamp() -> Self
pub fn with_current_timestamp() -> Self
Creates a BaseEvent with the current timestamp.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BaseEvent
impl<'de> Deserialize<'de> for BaseEvent
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 StructuralPartialEq for BaseEvent
Auto Trait Implementations§
impl Freeze for BaseEvent
impl RefUnwindSafe for BaseEvent
impl Send for BaseEvent
impl Sync for BaseEvent
impl Unpin for BaseEvent
impl UnsafeUnpin for BaseEvent
impl UnwindSafe for BaseEvent
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