pub struct Content {
pub role: Option<Role>,
pub parts: Vec<Part>,
}Expand description
The base structured datatype containing multi-part content of a message.
Fields§
§role: Option<Role>The producer of the content. Must be either ‘user’ or ‘model’.
parts: Vec<Part>Ordered Parts that constitute a single message.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Content
impl<'de> Deserialize<'de> for Content
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<&Content> for Message
impl From<&Content> for Message
Source§fn from(content: &GeminiContent) -> Self
fn from(content: &GeminiContent) -> Self
Converts to this type from the input type.
Source§impl From<&Content> for Message
impl From<&Content> for Message
Source§fn from(content: &GeminiContent) -> Self
fn from(content: &GeminiContent) -> Self
Converts to this type from the input type.
Source§impl From<&Message> for Content
impl From<&Message> for Content
Source§fn from(msg: &AnthropicMessage) -> Self
fn from(msg: &AnthropicMessage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
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