#[non_exhaustive]pub struct Reference {
pub content: Option<Content>,
/* private fields */
}conversational-search-service or session-service only.Expand description
Reference.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.content: Option<Content>Search result content.
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
pub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
Sets the value of content.
Note that all the setters affecting content are mutually
exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::UnstructuredDocumentInfo;
let x = Reference::new().set_content(Some(
google_cloud_discoveryengine_v1::model::answer::reference::Content::UnstructuredDocumentInfo(UnstructuredDocumentInfo::default().into())));Sourcepub fn unstructured_document_info(
&self,
) -> Option<&Box<UnstructuredDocumentInfo>>
pub fn unstructured_document_info( &self, ) -> Option<&Box<UnstructuredDocumentInfo>>
The value of content
if it holds a UnstructuredDocumentInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_unstructured_document_info<T: Into<Box<UnstructuredDocumentInfo>>>(
self,
v: T,
) -> Self
pub fn set_unstructured_document_info<T: Into<Box<UnstructuredDocumentInfo>>>( self, v: T, ) -> Self
Sets the value of content
to hold a UnstructuredDocumentInfo.
Note that all the setters affecting content are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::UnstructuredDocumentInfo;
let x = Reference::new().set_unstructured_document_info(UnstructuredDocumentInfo::default()/* use setters */);
assert!(x.unstructured_document_info().is_some());
assert!(x.chunk_info().is_none());
assert!(x.structured_document_info().is_none());Sourcepub fn chunk_info(&self) -> Option<&Box<ChunkInfo>>
pub fn chunk_info(&self) -> Option<&Box<ChunkInfo>>
The value of content
if it holds a ChunkInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_chunk_info<T: Into<Box<ChunkInfo>>>(self, v: T) -> Self
pub fn set_chunk_info<T: Into<Box<ChunkInfo>>>(self, v: T) -> Self
Sets the value of content
to hold a ChunkInfo.
Note that all the setters affecting content are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::ChunkInfo;
let x = Reference::new().set_chunk_info(ChunkInfo::default()/* use setters */);
assert!(x.chunk_info().is_some());
assert!(x.unstructured_document_info().is_none());
assert!(x.structured_document_info().is_none());Sourcepub fn structured_document_info(&self) -> Option<&Box<StructuredDocumentInfo>>
pub fn structured_document_info(&self) -> Option<&Box<StructuredDocumentInfo>>
The value of content
if it holds a StructuredDocumentInfo, None if the field is not set or
holds a different branch.
Sourcepub fn set_structured_document_info<T: Into<Box<StructuredDocumentInfo>>>(
self,
v: T,
) -> Self
pub fn set_structured_document_info<T: Into<Box<StructuredDocumentInfo>>>( self, v: T, ) -> Self
Sets the value of content
to hold a StructuredDocumentInfo.
Note that all the setters affecting content are
mutually exclusive.
§Example
use google_cloud_discoveryengine_v1::model::answer::reference::StructuredDocumentInfo;
let x = Reference::new().set_structured_document_info(StructuredDocumentInfo::default()/* use setters */);
assert!(x.structured_document_info().is_some());
assert!(x.unstructured_document_info().is_none());
assert!(x.chunk_info().is_none());Trait Implementations§
impl StructuralPartialEq for Reference
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin for Reference
impl UnwindSafe for Reference
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request