pub struct TurnScan {
skills: Vec<String>,
boundary: bool,
calls: bool,
open: Vec<String>,
}Expand description
Where the fold opens a conversation turn, walked frame by frame.
Fields§
§skills: Vec<String>The skills the open turn holds a call for, oldest first: a skill’s body belongs in the turn whose call loaded it.
boundary: boolWhether a compaction boundary sits in the open turn. The continuation prompt that follows belongs beside it, so it opens no turn of its own while this holds.
calls: boolWhether the open turn has taken a tool call. The harness’s line about an image it read arrives right behind the call that read it, so it joins that turn rather than opening one.
open: Vec<String>The open turn’s calls still waiting on their results, oldest first. A forge-minted row arriving at one is a delivery pressed into the running turn: the fold keeps it there, so no turn opens here either.
The fold answers that row too, and it can answer it more sharply - it reads the whole list and declines only where the call’s result really comes. This side reads a stream, so a call whose result never arrives (the restart shape, #1836) is declined here and opened there: a head the window cannot start on, never a cut inside a turn.
Implementations§
Source§impl TurnScan
impl TurnScan
Sourcepub fn opens(&mut self, message: &Message) -> bool
pub fn opens(&mut self, message: &Message) -> bool
Whether the fold opens a conversation turn at this frame, under the state the frames before it left.
Sourcefn calls_in(&mut self, content: &[ContentBlock])
fn calls_in(&mut self, content: &[ContentBlock])
The blocks that move the state the next turn opens under rather than
opening one: a call, the result that answers one, and a Skill call’s
own name for what it loads.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TurnScan
impl RefUnwindSafe for TurnScan
impl Send for TurnScan
impl Sync for TurnScan
impl Unpin for TurnScan
impl UnsafeUnpin for TurnScan
impl UnwindSafe for TurnScan
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more