pub struct ThinkingLoopDetector { /* private fields */ }Expand description
Stateful detector fed streamed thinking deltas.
Implementations§
Source§impl ThinkingLoopDetector
impl ThinkingLoopDetector
Sourcepub fn push(&mut self, delta: &str) -> Option<String>
pub fn push(&mut self, delta: &str) -> Option<String>
Feed one streamed thinking delta.
Returns Some(reason) the first time a loop is recognised. The
caller should stop the stream and surface the reason upstream.
Empty deltas are no-ops.
Trait Implementations§
Source§impl Debug for ThinkingLoopDetector
impl Debug for ThinkingLoopDetector
Source§impl Default for ThinkingLoopDetector
impl Default for ThinkingLoopDetector
Source§fn default() -> ThinkingLoopDetector
fn default() -> ThinkingLoopDetector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ThinkingLoopDetector
impl RefUnwindSafe for ThinkingLoopDetector
impl Send for ThinkingLoopDetector
impl Sync for ThinkingLoopDetector
impl Unpin for ThinkingLoopDetector
impl UnsafeUnpin for ThinkingLoopDetector
impl UnwindSafe for ThinkingLoopDetector
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