pub struct PromptMessage {
pub role: Role,
pub content: Content,
}
Expand description
Message in a prompt result (2025-03-26 with audio support)
Fieldsยง
ยงrole: Role
Role of the message
content: Content
Content of the message (supports all content types)
Implementationsยง
Trait Implementationsยง
Sourceยงimpl Clone for PromptMessage
impl Clone for PromptMessage
Sourceยงfn clone(&self) -> PromptMessage
fn clone(&self) -> PromptMessage
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 PromptMessage
impl Debug for PromptMessage
Sourceยงimpl<'de> Deserialize<'de> for PromptMessage
impl<'de> Deserialize<'de> for PromptMessage
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 PartialEq for PromptMessage
impl PartialEq for PromptMessage
Sourceยงimpl Serialize for PromptMessage
impl Serialize for PromptMessage
impl StructuralPartialEq for PromptMessage
Auto Trait Implementationsยง
impl Freeze for PromptMessage
impl RefUnwindSafe for PromptMessage
impl Send for PromptMessage
impl Sync for PromptMessage
impl Unpin for PromptMessage
impl UnwindSafe for PromptMessage
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