pub enum CodexRecord {
SessionMeta {
payload: SessionMeta,
},
TurnContext {
payload: TurnContext,
},
ResponseItem {
payload: ResponseItem,
},
EventMsg {
payload: EventMsg,
},
Compacted {
payload: Value,
},
Unknown,
}Expand description
A Codex envelope.
Variants§
SessionMeta
Session header (id, cwd, base instructions, …).
Fields
§
payload: SessionMetaThe header payload.
TurnContext
Per-turn context (carries the model, sandbox/approval policy, …).
Fields
§
payload: TurnContextThe turn-context payload (loosely modeled).
ResponseItem
A canonical conversation item.
Fields
§
payload: ResponseItemThe conversation payload, discriminated by its own type.
EventMsg
A UI event echo (token counts, task lifecycle, streamed renderings).
These duplicate response_item content and are not part of the
canonical conversation, but we name the payload type for completeness.
Compacted
A whole-history compaction record (replaces earlier turns).
Unknown
Any envelope type we do not model yet.
Implementations§
Source§impl CodexRecord
impl CodexRecord
Sourcepub fn tag(&self) -> Option<&'static str>
pub fn tag(&self) -> Option<&'static str>
The static discriminant name, or None for CodexRecord::Unknown.
Trait Implementations§
Source§impl Clone for CodexRecord
impl Clone for CodexRecord
Source§fn clone(&self) -> CodexRecord
fn clone(&self) -> CodexRecord
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 CodexRecord
impl Debug for CodexRecord
Source§impl<'de> Deserialize<'de> for CodexRecord
impl<'de> Deserialize<'de> for CodexRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodexRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodexRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CodexRecord
impl RefUnwindSafe for CodexRecord
impl Send for CodexRecord
impl Sync for CodexRecord
impl Unpin for CodexRecord
impl UnsafeUnpin for CodexRecord
impl UnwindSafe for CodexRecord
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