pub enum MessageRole {
System,
User,
Assistant,
Tool,
}Expand description
MessageRole
JSON schema
{
"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 · 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 From<&MessageRole> for MessageRole
impl From<&MessageRole> for MessageRole
Source§fn from(value: &MessageRole) -> Self
fn from(value: &MessageRole) -> Self
Converts to this type from the input type.
Source§impl From<MessageRole> for ModelRelayApi
impl From<MessageRole> for ModelRelayApi
Source§fn from(value: MessageRole) -> Self
fn from(value: MessageRole) -> Self
Converts to this type from the input type.
Source§impl FromStr for MessageRole
impl FromStr for MessageRole
Source§impl Hash for MessageRole
impl Hash for MessageRole
Source§impl MessageRoleExt for MessageRole
impl MessageRoleExt 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 · 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§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 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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.