#[non_exhaustive]pub struct RecallMessage {
pub id: i64,
pub role: String,
pub content: String,
pub tool_name: Option<String>,
pub tool_calls: Option<String>,
pub ts_ms: i64,
}Expand description
One transcript message in a recall session.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: i64Monotonic id within the session, assigned by the store on append. 0 on input.
role: String“user” | “assistant” | “tool” | “system”.
content: StringMessage text (assistant text, user prompt, or tool result body).
tool_name: Option<String>For tool messages: the tool name.
tool_calls: Option<String>For assistant messages: JSON-encoded tool-call array, if any.
ts_ms: i64Milliseconds since unix epoch.
Implementations§
Source§impl RecallMessage
impl RecallMessage
pub fn new( role: impl Into<String>, content: impl Into<String>, ts_ms: i64, ) -> RecallMessage
pub fn with_tool_name(self, name: impl Into<String>) -> RecallMessage
pub fn with_tool_calls(self, calls: impl Into<String>) -> RecallMessage
Trait Implementations§
Source§impl Clone for RecallMessage
impl Clone for RecallMessage
Source§fn clone(&self) -> RecallMessage
fn clone(&self) -> RecallMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RecallMessage
impl Debug for RecallMessage
Source§impl<'de> Deserialize<'de> for RecallMessage
impl<'de> Deserialize<'de> for RecallMessage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RecallMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RecallMessage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RecallMessage
impl Serialize for RecallMessage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RecallMessage
impl RefUnwindSafe for RecallMessage
impl Send for RecallMessage
impl Sync for RecallMessage
impl Unpin for RecallMessage
impl UnsafeUnpin for RecallMessage
impl UnwindSafe for RecallMessage
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