#[non_exhaustive]pub struct Message {
pub clear_at: Option<SystemMessageClearAt>,
pub output_config: Option<SystemMessageOutputConfig>,
pub role: Role,
pub content: MessageContent,
pub rest: Rest,
}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.clear_at: Option<SystemMessageClearAt>§output_config: Option<SystemMessageOutputConfig>§role: Role§content: MessageContentRequired for user and assistant messages; system messages may omit it.
rest: RestImplementations§
Source§impl Message
impl Message
Sourcepub fn builder(role: Role, content: MessageContent) -> MessageBuilder
pub fn builder(role: Role, content: MessageContent) -> MessageBuilder
Start a builder by supplying the required fields in declaration order.
Trait Implementations§
Source§impl DeclaredFields for Message
impl DeclaredFields for Message
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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