pub struct PlainTextContentBlock {
pub block_type: String,
pub id: Option<String>,
pub file_id: Option<String>,
pub mime_type: String,
pub index: Option<BlockIndex>,
pub url: Option<String>,
pub base64: Option<String>,
pub text: Option<String>,
pub title: Option<String>,
pub context: Option<String>,
pub extras: Option<HashMap<String, Value>>,
}Expand description
Plaintext data content block (e.g., from a .txt or .md document).
Fields§
§block_type: StringType of the content block. Always “text-plain”.
id: Option<String>Content block identifier.
file_id: Option<String>ID of the plaintext file, e.g., from a file storage system.
mime_type: StringMIME type of the file. Always “text/plain”.
index: Option<BlockIndex>Index of block in aggregate response. Used during streaming.
url: Option<String>URL of the plaintext.
base64: Option<String>Data as a base64 string.
text: Option<String>Plaintext content. Optional if the data is provided as base64.
title: Option<String>Title of the text data.
context: Option<String>Context for the text, e.g., a description or summary.
extras: Option<HashMap<String, Value>>Provider-specific metadata.
Implementations§
Trait Implementations§
Source§impl Clone for PlainTextContentBlock
impl Clone for PlainTextContentBlock
Source§fn clone(&self) -> PlainTextContentBlock
fn clone(&self) -> PlainTextContentBlock
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 PlainTextContentBlock
impl Debug for PlainTextContentBlock
Source§impl Default for PlainTextContentBlock
impl Default for PlainTextContentBlock
Source§impl<'de> Deserialize<'de> for PlainTextContentBlock
impl<'de> Deserialize<'de> for PlainTextContentBlock
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 PartialEq for PlainTextContentBlock
impl PartialEq for PlainTextContentBlock
Source§impl Serialize for PlainTextContentBlock
impl Serialize for PlainTextContentBlock
impl StructuralPartialEq for PlainTextContentBlock
Auto Trait Implementations§
impl Freeze for PlainTextContentBlock
impl RefUnwindSafe for PlainTextContentBlock
impl Send for PlainTextContentBlock
impl Sync for PlainTextContentBlock
impl Unpin for PlainTextContentBlock
impl UnwindSafe for PlainTextContentBlock
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