Skip to main content

ReadbackEntry

Enum ReadbackEntry 

Source
pub enum ReadbackEntry {
    ContextCompacted {
        turn_id: TurnId,
        estimated_tokens_before: u32,
        estimated_tokens_after: u32,
        dropped_turn_start: u64,
        dropped_turn_end_exclusive: u64,
    },
    ContextFragment {
        turn_id: TurnId,
        fragment: ContextFragment,
    },
    ModelMessage {
        turn_id: TurnId,
        message: Message,
        served_model: Option<ModelName>,
    },
    ModelFailed {
        turn_id: TurnId,
        step: u32,
        reason: String,
    },
    ToolProposalsRejected {
        turn_id: TurnId,
        reason: String,
    },
    ToolCall {
        turn_id: TurnId,
        call: ToolCall,
    },
    ToolResult {
        result: ToolResult,
    },
    PolicyDenied {
        call_id: ToolCallId,
        reason: String,
    },
    ApprovalGranted {
        call_id: ToolCallId,
        actor_id: ActorId,
    },
    ApprovalDenied {
        call_id: ToolCallId,
        actor_id: ActorId,
        reason: String,
    },
    ToolFailed {
        call_id: ToolCallId,
        reason: String,
    },
}
Expand description

One deterministic readback entry projected from the ledger.

Variants§

§

ContextCompacted

Prior turns omitted from the next model context.

Fields

§turn_id: TurnId

Turn whose context reflects the compaction.

§estimated_tokens_before: u32

Estimated tokens before prior turns were dropped.

§estimated_tokens_after: u32

Estimated tokens after prior turns were dropped.

§dropped_turn_start: u64

Zero-based first dropped prior-turn position.

§dropped_turn_end_exclusive: u64

Exclusive end of the dropped prior-turn range.

§

ContextFragment

One host-built context fragment that entered a model turn.

Fields

§turn_id: TurnId

Turn that received the fragment.

§fragment: ContextFragment

Exact fragment recorded in the turn context.

§

ModelMessage

Model response message.

Fields

§turn_id: TurnId

Turn that received the response.

§message: Message

Normalized model-authored message.

§served_model: Option<ModelName>

Provider-reported model that served the response, when available.

§

ModelFailed

Model request failed without terminating the run.

Fields

§turn_id: TurnId

Turn of the failed model request.

§step: u32

Model step of the failed request.

§reason: String

Recorded host-reported failure reason.

§

ToolProposalsRejected

Host rejected the whole pending model proposal batch.

Fields

§turn_id: TurnId

Turn that produced the rejected proposals.

§reason: String

Recorded host explanation for rejecting the whole batch.

§

ToolCall

Host-validated tool call consumed for a turn.

Fields

§turn_id: TurnId

Turn that proposed the call.

§call: ToolCall

Validated and effect-classified call.

§

ToolResult

Structured tool result.

Fields

§result: ToolResult

Exact result recorded after execution.

§

PolicyDenied

Policy denied a tool call before execution.

Fields

§call_id: ToolCallId

Call rejected by policy.

§reason: String

Recorded policy explanation.

§

ApprovalGranted

Approval granted a tool call before execution.

Fields

§call_id: ToolCallId

Call approved for execution.

§actor_id: ActorId

Human or host actor that granted approval.

§

ApprovalDenied

Approval denied a tool call before execution.

Fields

§call_id: ToolCallId

Call denied before execution.

§actor_id: ActorId

Human or host actor that denied approval.

§reason: String

Recorded denial explanation.

§

ToolFailed

Tool execution failed.

Fields

§call_id: ToolCallId

Call whose execution failed.

§reason: String

Recorded host failure explanation.

Trait Implementations§

Source§

impl Clone for ReadbackEntry

Source§

fn clone(&self) -> ReadbackEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReadbackEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ReadbackEntry

Source§

fn eq(&self, other: &ReadbackEntry) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ReadbackEntry

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.