pub struct TranscriptRecorder { /* private fields */ }Expand description
A Hook that enqueues assistant + tool turns onto a channel. Construct with
TranscriptRecorder::new, which also returns the receiver to hand to
spawn_transcript_writer.
Implementations§
Source§impl TranscriptRecorder
impl TranscriptRecorder
Sourcepub fn new(
session: impl Into<String>,
) -> (Self, UnboundedReceiver<CapturedTurn>)
pub fn new( session: impl Into<String>, ) -> (Self, UnboundedReceiver<CapturedTurn>)
Create a recorder for session, returning it plus the receiver its
background writer drains.
Sourcepub fn with_max_chars(self, max_chars: usize) -> Self
pub fn with_max_chars(self, max_chars: usize) -> Self
Override the per-turn character cap. 0 disables truncation — only do
that for a backend you are happy to grow without bound.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TranscriptRecorder
impl Forget for TranscriptRecorder
impl RefUnwindSafe for TranscriptRecorder
impl Send for TranscriptRecorder
impl Sync for TranscriptRecorder
impl Unpin for TranscriptRecorder
impl UnsafeUnpin for TranscriptRecorder
impl UnwindSafe for TranscriptRecorder
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