pub struct UserMessage {
pub id: MessageId,
pub content: UserContent,
pub name: Option<String>,
pub encrypted_value: Option<String>,
pub subagent_run_id: Option<SubagentRunId>,
pub metadata: Option<JsonObject>,
}Expand description
End-user input, possibly multimodal.
Fields§
§id: MessageIdMessage id.
content: UserContentText or multimodal parts.
name: Option<String>Optional display name for the author.
encrypted_value: Option<String>Opaque provider payload for zero-data-retention modes.
subagent_run_id: Option<SubagentRunId>The subagent that produced this message; absent means the parent
agent. A JSON null is rejected — see crate::event::subagent.
metadata: Option<JsonObject>Extra information, open by key. Absent or an object — a JSON null
is rejected. See crate::metadata.
Trait Implementations§
Source§impl Clone for UserMessage
impl Clone for UserMessage
Source§fn clone(&self) -> UserMessage
fn clone(&self) -> UserMessage
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 ComposeSchema for UserMessage
impl ComposeSchema for UserMessage
Source§impl Debug for UserMessage
impl Debug for UserMessage
Source§impl Default for UserMessage
impl Default for UserMessage
Source§fn default() -> UserMessage
fn default() -> UserMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UserMessage
impl<'de> Deserialize<'de> for UserMessage
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
Source§impl From<UserMessage> for Message
impl From<UserMessage> for Message
Source§fn from(value: UserMessage) -> Self
fn from(value: UserMessage) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for UserMessage
impl JsonSchema for UserMessage
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for UserMessage
impl PartialEq for UserMessage
Source§fn eq(&self, other: &UserMessage) -> bool
fn eq(&self, other: &UserMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UserMessage
impl Serialize for UserMessage
impl StructuralPartialEq for UserMessage
Auto Trait Implementations§
impl Freeze for UserMessage
impl RefUnwindSafe for UserMessage
impl Send for UserMessage
impl Sync for UserMessage
impl Unpin for UserMessage
impl UnsafeUnpin for UserMessage
impl UnwindSafe for UserMessage
Blanket Implementations§
impl<T> AgentState for T
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