pub struct AgentStreamRecord {
pub sequence: usize,
pub source: Option<AgentStreamSource>,
pub event: AgentStreamEvent,
}Expand description
Sequenced stream event record.
Fields§
§sequence: usizeMonotonic event sequence number within one run.
source: Option<AgentStreamSource>Source attribution for records merged from nested runs.
event: AgentStreamEventTyped event payload.
Implementations§
Source§impl AgentStreamRecord
impl AgentStreamRecord
Sourcepub const fn new(sequence: usize, event: AgentStreamEvent) -> AgentStreamRecord
pub const fn new(sequence: usize, event: AgentStreamEvent) -> AgentStreamRecord
Create a sequenced stream record.
Sourcepub fn is_subagent_steering_event(&self) -> bool
pub fn is_subagent_steering_event(&self) -> bool
Returns true when this is a steering event emitted by a delegated subagent.
Raw records retain these events for durable replay and trace evidence. Display projections use source attribution to keep child steering internals out of user-facing streams without discarding the canonical record. Main-agent steering remains visible.
Sourcepub fn with_source(self, source: AgentStreamSource) -> AgentStreamRecord
pub fn with_source(self, source: AgentStreamSource) -> AgentStreamRecord
Attach source attribution.
Sourcepub const fn with_sequence(self, sequence: usize) -> AgentStreamRecord
pub const fn with_sequence(self, sequence: usize) -> AgentStreamRecord
Replace the parent stream sequence after merging into another stream.
Trait Implementations§
Source§impl Clone for AgentStreamRecord
impl Clone for AgentStreamRecord
Source§fn clone(&self) -> AgentStreamRecord
fn clone(&self) -> AgentStreamRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentStreamRecord
impl Debug for AgentStreamRecord
Source§impl<'de> Deserialize<'de> for AgentStreamRecord
impl<'de> Deserialize<'de> for AgentStreamRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentStreamRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentStreamRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AgentStreamRecord
Source§impl PartialEq for AgentStreamRecord
impl PartialEq for AgentStreamRecord
Source§impl Serialize for AgentStreamRecord
impl Serialize for AgentStreamRecord
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 AgentStreamRecord
Source§impl VersionedRecord for AgentStreamRecord
impl VersionedRecord for AgentStreamRecord
Source§const ALLOW_BARE_V0: bool = true
const ALLOW_BARE_V0: bool = true
Whether this record explicitly accepts a previous bare-JSON v0 shape.
Source§fn decode_version(
version: u32,
payload: Value,
) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
fn decode_version(
version: u32,
payload: Value,
) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
Decode one enveloped payload version. Read more
Source§fn decode_bare_v0(payload: Value) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
fn decode_bare_v0(payload: Value) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
Decode the explicitly supported bare-JSON v0 shape. Read more
Auto Trait Implementations§
impl Freeze for AgentStreamRecord
impl RefUnwindSafe for AgentStreamRecord
impl Send for AgentStreamRecord
impl Sync for AgentStreamRecord
impl Unpin for AgentStreamRecord
impl UnsafeUnpin for AgentStreamRecord
impl UnwindSafe for AgentStreamRecord
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