pub struct MessagesTextBlock {
pub cache_control: Option<CacheControl>,
pub text: String,
pub type_: MessagesTextBlockType,
}Expand description
A text content block in a Messages API request or response.
JSON schema
{
"description": "A text content block in a Messages API request or response.",
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"cache_control": {
"$ref": "#/definitions/CacheControl"
},
"text": {
"description": "The text content.",
"type": "string"
},
"type": {
"description": "Content type identifier. Always `text`.",
"type": "string",
"enum": [
"text"
]
}
}
}Fields§
§cache_control: Option<CacheControl>§text: StringThe text content.
type_: MessagesTextBlockTypeContent type identifier. Always text.
Trait Implementations§
Source§impl Clone for MessagesTextBlock
impl Clone for MessagesTextBlock
Source§fn clone(&self) -> MessagesTextBlock
fn clone(&self) -> MessagesTextBlock
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 MessagesTextBlock
impl Debug for MessagesTextBlock
Source§impl<'de> Deserialize<'de> for MessagesTextBlock
impl<'de> Deserialize<'de> for MessagesTextBlock
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<MessagesTextBlock> for MessagesRequestContentBlock
impl From<MessagesTextBlock> for MessagesRequestContentBlock
Source§fn from(value: MessagesTextBlock) -> Self
fn from(value: MessagesTextBlock) -> Self
Converts to this type from the input type.
Source§impl From<MessagesTextBlock> for MessagesResponseContentBlock
impl From<MessagesTextBlock> for MessagesResponseContentBlock
Source§fn from(value: MessagesTextBlock) -> Self
fn from(value: MessagesTextBlock) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MessagesTextBlock
impl RefUnwindSafe for MessagesTextBlock
impl Send for MessagesTextBlock
impl Sync for MessagesTextBlock
impl Unpin for MessagesTextBlock
impl UnsafeUnpin for MessagesTextBlock
impl UnwindSafe for MessagesTextBlock
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