pub struct StepAssembler { /* private fields */ }Available on crate feature
async-client only.Expand description
Accumulates StepUpdate frames into Steps.
Implementations§
Source§impl StepAssembler
impl StepAssembler
Sourcepub fn new(main_trajectory: Option<String>) -> Self
pub fn new(main_trajectory: Option<String>) -> Self
A fresh assembler for a conversation.
main_trajectory should be the conversation’s cascade id when known;
otherwise the first trajectory seen is adopted as the main one.
Sourcepub fn main_trajectory(&self) -> Option<&str>
pub fn main_trajectory(&self) -> Option<&str>
The trajectory treated as the main conversation.
Sourcepub fn is_main(&self, trajectory_id: &str) -> bool
pub fn is_main(&self, trajectory_id: &str) -> bool
True when trajectory_id is the main conversation rather than a
subagent’s.
Sourcepub fn ingest(&mut self, update: StepUpdate) -> Step
pub fn ingest(&mut self, update: StepUpdate) -> Step
Folds one update into the running state and returns the merged step.
Trait Implementations§
Source§impl Debug for StepAssembler
impl Debug for StepAssembler
Source§impl Default for StepAssembler
impl Default for StepAssembler
Source§fn default() -> StepAssembler
fn default() -> StepAssembler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StepAssembler
impl RefUnwindSafe for StepAssembler
impl Send for StepAssembler
impl Sync for StepAssembler
impl Unpin for StepAssembler
impl UnsafeUnpin for StepAssembler
impl UnwindSafe for StepAssembler
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