pub struct TextContentPart {
pub text: String,
pub type_: TextContentPartType,
}Expand description
Text content part
JSON schema
{
"description": "Text content part",
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"description": "The text content",
"type": "string"
},
"type": {
"description": "Content type identifier",
"type": "string",
"enum": [
"text"
]
}
}
}Fields§
§text: StringThe text content
type_: TextContentPartTypeContent type identifier
Trait Implementations§
Source§impl Clone for TextContentPart
impl Clone for TextContentPart
Source§fn clone(&self) -> TextContentPart
fn clone(&self) -> TextContentPart
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 TextContentPart
impl Debug for TextContentPart
Source§impl<'de> Deserialize<'de> for TextContentPart
impl<'de> Deserialize<'de> for TextContentPart
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<TextContentPart> for ContentPart
impl From<TextContentPart> for ContentPart
Source§fn from(value: TextContentPart) -> Self
fn from(value: TextContentPart) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TextContentPart
impl RefUnwindSafe for TextContentPart
impl Send for TextContentPart
impl Sync for TextContentPart
impl Unpin for TextContentPart
impl UnsafeUnpin for TextContentPart
impl UnwindSafe for TextContentPart
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