pub struct ConversationLog { /* private fields */ }Implementations§
Source§impl ConversationLog
impl ConversationLog
Sourcepub const fn with_capacity(cap: usize) -> Self
pub const fn with_capacity(cap: usize) -> Self
cap = 0 means unbounded. Production uses ~2048; tests use
smaller values to exercise wrapping cheaply.
pub fn push(&mut self, entry: LogEntry)
pub fn tail(&self, n: usize) -> &[LogEntry]
Sourcepub fn entries(&self) -> &[LogEntry]
pub fn entries(&self) -> &[LogEntry]
Full entry slice, ordered oldest → newest. The conversation
pane uses this for scrollback indexing; [tail] stays for
callers that only care about the most recent N rows.
Sourcepub fn last_mut(&mut self) -> Option<&mut LogEntry>
pub fn last_mut(&mut self) -> Option<&mut LogEntry>
Mutable access to the newest entry, if any. Used by the streaming hook to append text onto a partial assistant reply without allocating a fresh row.
Sourcepub fn extend_last(&mut self, id: &str, more: &str) -> bool
pub fn extend_last(&mut self, id: &str, more: &str) -> bool
Streaming append — extend the text of the entry whose
LogEntry::stream_id matches id. The engine-side
streaming transport (SSE / WS partial messages) is not yet
wired in M1; this method exists so the UI is ready to
consume it in M2 without a further widget rewrite.
Returns true when the append landed, false if no
matching entry was found (the caller should create a new
entry in that case).
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for ConversationLog
impl Debug for ConversationLog
Source§impl Default for ConversationLog
impl Default for ConversationLog
Source§fn default() -> ConversationLog
fn default() -> ConversationLog
Auto Trait Implementations§
impl Freeze for ConversationLog
impl RefUnwindSafe for ConversationLog
impl Send for ConversationLog
impl Sync for ConversationLog
impl Unpin for ConversationLog
impl UnsafeUnpin for ConversationLog
impl UnwindSafe for ConversationLog
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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