pub enum MessageRole {
System,
User,
Assistant,
Tool,
}Expand description
Role of the message sender
JSON schema
{
"description": "Role of the message sender",
"type": "string",
"enum": [
"system",
"user",
"assistant",
"tool"
]
}Variants§
Trait Implementations§
Source§impl Clone for MessageRole
impl Clone for MessageRole
Source§fn clone(&self) -> MessageRole
fn clone(&self) -> MessageRole
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 MessageRole
impl Debug for MessageRole
Source§impl<'de> Deserialize<'de> for MessageRole
impl<'de> Deserialize<'de> for MessageRole
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 Display for MessageRole
impl Display for MessageRole
Source§impl FromStr for MessageRole
impl FromStr for MessageRole
Source§impl Hash for MessageRole
impl Hash for MessageRole
Source§impl Ord for MessageRole
impl Ord for MessageRole
Source§fn cmp(&self, other: &MessageRole) -> Ordering
fn cmp(&self, other: &MessageRole) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MessageRole
impl PartialEq for MessageRole
Source§fn eq(&self, other: &MessageRole) -> bool
fn eq(&self, other: &MessageRole) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MessageRole
impl PartialOrd for MessageRole
Source§impl Serialize for MessageRole
impl Serialize for MessageRole
Source§impl TryFrom<&String> for MessageRole
impl TryFrom<&String> for MessageRole
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for MessageRole
impl TryFrom<&str> for MessageRole
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for MessageRole
impl TryFrom<String> for MessageRole
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
impl Copy for MessageRole
impl Eq for MessageRole
impl StructuralPartialEq for MessageRole
Auto Trait Implementations§
impl Freeze for MessageRole
impl RefUnwindSafe for MessageRole
impl Send for MessageRole
impl Sync for MessageRole
impl Unpin for MessageRole
impl UnsafeUnpin for MessageRole
impl UnwindSafe for MessageRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.