#[non_exhaustive]pub enum SessionRecord {
Meta(Box<SessionMeta>),
#[non_exhaustive] TurnContext {
turn_id: Option<String>,
cwd: Option<PathBuf>,
model: Option<String>,
},
#[non_exhaustive] Prompt {
turn_id: Option<String>,
text: String,
},
#[non_exhaustive] ToolCall {
call_id: Option<String>,
name: String,
namespace: Option<String>,
input: Value,
},
#[non_exhaustive] ToolResult {
call_id: Option<String>,
output: Value,
},
#[non_exhaustive] TurnComplete {
turn_id: Option<String>,
last_agent_message: Option<String>,
error: Option<String>,
},
#[non_exhaustive] TurnAborted {
turn_id: Option<String>,
reason: Option<String>,
},
}Expand description
What a SessionEntry means.
The entry keeps the payload as written, for fields not named here.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Meta(Box<SessionMeta>)
Session metadata. The first line of a session.
#[non_exhaustive]TurnContext
The settings a turn runs with.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Prompt
A message from the user.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]ToolCall
A tool call by the model.
local_shell_call and image_generation_call are not typed, because
there is no captured sample of them.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
call_id: Option<String>Matches the ToolResult. A web search has
neither.
#[non_exhaustive]ToolResult
The result of a tool call.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]TurnComplete
A turn ended by itself.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]TurnAborted
A turn was interrupted.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Trait Implementations§
Source§impl Clone for SessionRecord
impl Clone for SessionRecord
Source§impl Debug for SessionRecord
impl Debug for SessionRecord
Source§impl PartialEq for SessionRecord
impl PartialEq for SessionRecord
impl StructuralPartialEq for SessionRecord
Auto Trait Implementations§
impl Forget for SessionRecord
impl Freeze for SessionRecordwhere
*const SessionMeta is !null: Freeze,
PhantomData<SessionMeta>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for SessionRecord
impl RefUnwindSafe for SessionRecord
impl Send for SessionRecord
impl Sync for SessionRecord
impl Unpin for SessionRecord
impl UnsafeUnpin for SessionRecordwhere
*const SessionMeta is !null: UnsafeUnpin,
PhantomData<SessionMeta>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for SessionRecordwhere
BoxRaw<SessionMeta>: UnwindSafe,
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
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