pub struct MessageGraph {
pub messages: Vec<Message>,
pub active_message_id: Option<String>,
}Fields§
§messages: Vec<Message>§active_message_id: Option<String>Implementations§
Source§impl MessageGraph
impl MessageGraph
pub fn new() -> Self
pub fn add_message(&mut self, message: Message)
pub fn add_message_from_data(&mut self, message_data: MessageData) -> &Message
pub fn clear(&mut self)
pub fn find_tool_name_by_id(&self, tool_id: &str) -> Option<String>
pub fn edit_message( &mut self, message_id: &str, new_content: Vec<UserContent>, ) -> Option<String>
pub fn update_command_execution( &mut self, message_id: &str, command: String, stdout: String, stderr: String, exit_code: i32, ) -> Option<Message>
pub fn replace_message(&mut self, updated: Message) -> bool
pub fn checkout(&mut self, message_id: &str) -> bool
pub fn get_active_thread(&self) -> Vec<&Message>
pub fn get_thread_messages(&self) -> Vec<&Message>
Trait Implementations§
Source§impl Clone for MessageGraph
impl Clone for MessageGraph
Source§fn clone(&self) -> MessageGraph
fn clone(&self) -> MessageGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageGraph
impl Debug for MessageGraph
Source§impl Default for MessageGraph
impl Default for MessageGraph
Source§impl<'de> Deserialize<'de> for MessageGraph
impl<'de> Deserialize<'de> for MessageGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MessageGraph
impl RefUnwindSafe for MessageGraph
impl Send for MessageGraph
impl Sync for MessageGraph
impl Unpin for MessageGraph
impl UnwindSafe for MessageGraph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request