pub struct EventRecord {
pub ts: String,
pub iteration: u32,
pub hat: String,
pub topic: String,
pub triggered: Option<String>,
pub payload: String,
pub blocked_count: Option<u32>,
pub wave_id: Option<String>,
pub wave_index: Option<u32>,
pub wave_total: Option<u32>,
}Expand description
A logged event record for debugging.
Supports two schemas:
- Rich internal format (logged by Ralph):
{"ts":"2024-01-15T10:23:45Z","iteration":1,"hat":"loop","topic":"task.start","triggered":"planner","payload":"..."} - Simple agent format (written by agents):
{"topic":"build.task","payload":"...","ts":"2024-01-15T10:24:12Z"}
Fields that don’t exist in the agent format default to sensible values.
Fields§
§ts: StringISO 8601 timestamp.
iteration: u32Loop iteration number (0 if not provided by agent-written events).
hat: StringHat that was active when event was published (empty string if not provided).
topic: StringEvent topic.
triggered: Option<String>Hat that will be triggered by this event.
payload: StringEvent content (truncated if large). Defaults to empty string for agent events without payload. Accepts both string and object payloads - objects are serialized to JSON strings.
blocked_count: Option<u32>How many times this task has blocked (optional).
wave_id: Option<String>Wave correlation ID.
wave_index: Option<u32>Index of this event within the wave (0-based).
wave_total: Option<u32>Total number of events in the wave.
Implementations§
Trait Implementations§
Source§impl Clone for EventRecord
impl Clone for EventRecord
Source§fn clone(&self) -> EventRecord
fn clone(&self) -> EventRecord
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 EventRecord
impl Debug for EventRecord
Source§impl<'de> Deserialize<'de> for EventRecord
impl<'de> Deserialize<'de> for EventRecord
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 EventRecord
impl RefUnwindSafe for EventRecord
impl Send for EventRecord
impl Sync for EventRecord
impl Unpin for EventRecord
impl UnsafeUnpin for EventRecord
impl UnwindSafe for EventRecord
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