pub struct BaseEvent {
pub timestamp: Option<f64>,
pub raw_event: Option<Value>,
}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<Value>Raw event from the underlying provider (for debugging/passthrough).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BaseEvent
impl<'de> Deserialize<'de> for BaseEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BaseEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BaseEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BaseEvent
impl Serialize for BaseEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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