pub struct MessagesDocumentSource {
pub data: Option<String>,
pub media_type: Option<String>,
pub type_: MessagesDocumentSourceType,
pub url: Option<String>,
}Expand description
The source of a document content block. Can be a base64-encoded document or a URL.
JSON schema
{
"description": "The source of a document content block. Can be a base64-encoded\ndocument or a URL.\n",
"type": "object",
"required": [
"type"
],
"properties": {
"data": {
"description": "Base64-encoded document data. Required when `type` is `base64`.\n",
"type": "string"
},
"media_type": {
"description": "The media type of the document (e.g. `application/pdf`).\nRequired when `type` is `base64`.\n",
"type": "string"
},
"type": {
"description": "The source type.",
"type": "string",
"enum": [
"base64",
"url"
]
},
"url": {
"description": "URL of the document. Required when `type` is `url`.\n",
"type": "string"
}
}
}Fields§
§data: Option<String>Base64-encoded document data. Required when type is base64.
media_type: Option<String>The media type of the document (e.g. application/pdf).
Required when type is base64.
type_: MessagesDocumentSourceTypeThe source type.
url: Option<String>URL of the document. Required when type is url.
Trait Implementations§
Source§impl Clone for MessagesDocumentSource
impl Clone for MessagesDocumentSource
Source§fn clone(&self) -> MessagesDocumentSource
fn clone(&self) -> MessagesDocumentSource
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 MessagesDocumentSource
impl Debug for MessagesDocumentSource
Source§impl<'de> Deserialize<'de> for MessagesDocumentSource
impl<'de> Deserialize<'de> for MessagesDocumentSource
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
Auto Trait Implementations§
impl Freeze for MessagesDocumentSource
impl RefUnwindSafe for MessagesDocumentSource
impl Send for MessagesDocumentSource
impl Sync for MessagesDocumentSource
impl Unpin for MessagesDocumentSource
impl UnsafeUnpin for MessagesDocumentSource
impl UnwindSafe for MessagesDocumentSource
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