pub struct ConversationView<'a> { /* private fields */ }Implementations§
Source§impl<'a> ConversationView<'a>
impl<'a> ConversationView<'a>
pub fn new(messages: &'a [Message]) -> Self
pub fn messages(&self) -> &[Message]
pub fn last_assistant(&self) -> Option<&Message>
Sourcepub fn user_visible(&self) -> Vec<Message>
pub fn user_visible(&self) -> Vec<Message>
Strips tool-use/tool-result content blocks. Useful for UserSimulator
implementations that should only see human-visible conversation.
Sourcepub fn token_estimate(&self) -> u32
pub fn token_estimate(&self) -> u32
Cheap heuristic — 4 chars per token. Useful only for budget estimates, not for anything the LLM charges for.
Auto Trait Implementations§
impl<'a> Freeze for ConversationView<'a>
impl<'a> RefUnwindSafe for ConversationView<'a>
impl<'a> Send for ConversationView<'a>
impl<'a> Sync for ConversationView<'a>
impl<'a> Unpin for ConversationView<'a>
impl<'a> UnsafeUnpin for ConversationView<'a>
impl<'a> UnwindSafe for ConversationView<'a>
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