Skip to main content

TurnRequestSnapshot

Struct TurnRequestSnapshot 

Source
pub struct TurnRequestSnapshot { /* private fields */ }
Expand description

Immutable model request plus the durable tail used to construct it.

Implementations§

Source§

impl TurnRequestSnapshot

Source

pub fn build( state: &MaterializedSessionState, config: &KernelRunConfig, tools: &ToolRegistry, model: &ModelSpec, ) -> Result<Self, KernelError>

Builds and validates one immutable request from committed session state.

Registered tool specifications are projected in canonical name order and parallel calls remain disabled for the sequential milestone scheduler.

§Errors

Returns a typed error when no model is selected, the provider does not advertise it, or model/tool/request bounds are incompatible.

Source

pub const fn request(&self) -> &ModelRequest

Returns the immutable provider request.

Source

pub fn client_tool_names(&self) -> &[ToolName]

Returns the exact client-executable function names frozen for this turn.

Active hosted projections are deliberately absent even when their portable tool specifications also have a client route.

Source

pub fn hosted_tool_names(&self) -> &[ToolName]

Returns the exact provider-hosted tool names frozen for this turn.

Source

pub fn allows_client_tool_call(&self, tool_name: &str) -> bool

Returns whether a provider function call may enter local execution.

Source

pub fn is_hosted_tool_projection(&self, tool_name: &str) -> bool

Returns whether this name was projected as a provider-hosted tool.

Source

pub fn into_request(self) -> ModelRequest

Consumes the snapshot into its provider request.

Source

pub const fn durable_tail(&self) -> SessionSequence

Returns the durable session tail captured with the request.

Trait Implementations§

Source§

impl Clone for TurnRequestSnapshot

Source§

fn clone(&self) -> Self

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 TurnRequestSnapshot

Source§

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

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

impl PartialEq for TurnRequestSnapshot

Source§

fn eq(&self, other: &Self) -> 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 TurnRequestSnapshot

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.