#[non_exhaustive]pub struct UnstructuredDocumentInfo {
pub document: String,
pub uri: String,
pub title: String,
pub chunk_contents: Vec<ChunkContent>,
pub struct_data: Option<Struct>,
/* private fields */
}Available on crate features
conversational-search-service or session-service only.Expand description
Unstructured document information.
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.document: StringDocument resource name.
uri: StringURI for the document.
title: StringTitle.
chunk_contents: Vec<ChunkContent>List of cited chunk contents derived from document content.
struct_data: Option<Struct>The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
Implementations§
Source§impl UnstructuredDocumentInfo
impl UnstructuredDocumentInfo
pub fn new() -> Self
Sourcepub fn set_document<T: Into<String>>(self, v: T) -> Self
pub fn set_document<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_chunk_contents<T, V>(self, v: T) -> Self
pub fn set_chunk_contents<T, V>(self, v: T) -> Self
Sets the value of chunk_contents.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer::reference::unstructured_document_info::ChunkContent;
let x = UnstructuredDocumentInfo::new()
.set_chunk_contents([
ChunkContent::default()/* use setters */,
ChunkContent::default()/* use (different) setters */,
]);Sourcepub fn set_struct_data<T>(self, v: T) -> Self
pub fn set_struct_data<T>(self, v: T) -> Self
Sets the value of struct_data.
§Example
ⓘ
use wkt::Struct;
let x = UnstructuredDocumentInfo::new().set_struct_data(Struct::default()/* use setters */);Sourcepub fn set_or_clear_struct_data<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_struct_data<T>(self, v: Option<T>) -> Self
Sets or clears the value of struct_data.
§Example
ⓘ
use wkt::Struct;
let x = UnstructuredDocumentInfo::new().set_or_clear_struct_data(Some(Struct::default()/* use setters */));
let x = UnstructuredDocumentInfo::new().set_or_clear_struct_data(None::<Struct>);Trait Implementations§
Source§impl Clone for UnstructuredDocumentInfo
impl Clone for UnstructuredDocumentInfo
Source§fn clone(&self) -> UnstructuredDocumentInfo
fn clone(&self) -> UnstructuredDocumentInfo
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 UnstructuredDocumentInfo
impl Debug for UnstructuredDocumentInfo
Source§impl Default for UnstructuredDocumentInfo
impl Default for UnstructuredDocumentInfo
Source§fn default() -> UnstructuredDocumentInfo
fn default() -> UnstructuredDocumentInfo
Returns the “default value” for a type. Read more
Source§impl Message for UnstructuredDocumentInfo
impl Message for UnstructuredDocumentInfo
Source§impl PartialEq for UnstructuredDocumentInfo
impl PartialEq for UnstructuredDocumentInfo
impl StructuralPartialEq for UnstructuredDocumentInfo
Auto Trait Implementations§
impl Freeze for UnstructuredDocumentInfo
impl RefUnwindSafe for UnstructuredDocumentInfo
impl Send for UnstructuredDocumentInfo
impl Sync for UnstructuredDocumentInfo
impl Unpin for UnstructuredDocumentInfo
impl UnwindSafe for UnstructuredDocumentInfo
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