pub struct FileContentBlock {
pub block_type: String,
pub id: Option<String>,
pub file_id: Option<String>,
pub mime_type: Option<String>,
pub index: Option<BlockIndex>,
pub url: Option<String>,
pub base64: Option<String>,
pub extras: Option<HashMap<String, Value>>,
}Expand description
File data content block for files that don’t fit other categories.
This block is intended for files that are not images, audio, or plaintext. For example, it can be used for PDFs, Word documents, etc.
Fields§
§block_type: StringType of the content block. Always “file”.
id: Option<String>Content block identifier.
file_id: Option<String>ID of the file, e.g., from a file storage system.
mime_type: Option<String>MIME type of the file. Required for base64.
index: Option<BlockIndex>Index of block in aggregate response. Used during streaming.
url: Option<String>URL of the file.
base64: Option<String>Data as a base64 string.
extras: Option<HashMap<String, Value>>Provider-specific metadata.
Implementations§
Trait Implementations§
Source§impl Clone for FileContentBlock
impl Clone for FileContentBlock
Source§fn clone(&self) -> FileContentBlock
fn clone(&self) -> FileContentBlock
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 FileContentBlock
impl Debug for FileContentBlock
Source§impl Default for FileContentBlock
impl Default for FileContentBlock
Source§impl<'de> Deserialize<'de> for FileContentBlock
impl<'de> Deserialize<'de> for FileContentBlock
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 FileContentBlock
impl PartialEq for FileContentBlock
Source§impl Serialize for FileContentBlock
impl Serialize for FileContentBlock
impl StructuralPartialEq for FileContentBlock
Auto Trait Implementations§
impl Freeze for FileContentBlock
impl RefUnwindSafe for FileContentBlock
impl Send for FileContentBlock
impl Sync for FileContentBlock
impl Unpin for FileContentBlock
impl UnwindSafe for FileContentBlock
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