#[non_exhaustive]pub struct Content {
pub mime_type: String,
pub content: Option<Content>,
/* private fields */
}Available on crate features
conversational-search-service or document-service or recommendation-service or search-service only.Expand description
Unstructured data linked to this document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mime_type: StringThe MIME type of the content. Supported types:
application/pdf(PDF, only native PDFs are supported for now)text/html(HTML)text/plain(TXT)application/xmlortext/xml(XML)application/json(JSON)application/vnd.openxmlformats-officedocument.wordprocessingml.document(DOCX)application/vnd.openxmlformats-officedocument.presentationml.presentation(PPTX)application/vnd.openxmlformats-officedocument.spreadsheetml.sheet(XLSX)application/vnd.ms-excel.sheet.macroenabled.12(XLSM)
The following types are supported only if layout parser is enabled in the data store:
image/bmp(BMP)image/gif(GIF)image/jpeg(JPEG)image/png(PNG)image/tiff(TIFF)
See https://www.iana.org/assignments/media-types/media-types.xhtml.
content: Option<Content>The content of the unstructured document.
Implementations§
Source§impl Content
impl Content
pub fn new() -> Self
Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
pub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
Sourcepub fn raw_bytes(&self) -> Option<&Bytes>
pub fn raw_bytes(&self) -> Option<&Bytes>
The value of content
if it holds a RawBytes, None if the field is not set or
holds a different branch.
Sourcepub fn set_raw_bytes<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_raw_bytes<T: Into<Bytes>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Content
Auto Trait Implementations§
impl !Freeze for Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
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