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§impl ComposeSchema for UserMessage
Available on crate feature utoipa only.
impl ComposeSchema for UserMessage
Available on crate feature
utoipa only.Source§impl Debug for UserMessage
impl Debug for UserMessage
Source§impl Default for UserMessage
impl Default for UserMessage
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
Available on crate feature schemars only.
impl JsonSchema for UserMessage
Available on crate feature
schemars only.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§impl Serialize for UserMessage
impl Serialize for UserMessage
impl StructuralPartialEq for UserMessage
Auto Trait Implementations§
impl Forget for UserMessage
impl Freeze for UserMessage
impl Move 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