#[non_exhaustive]pub struct SummaryWithMetadata {
pub summary: String,
pub citation_metadata: Option<CitationMetadata>,
pub references: Vec<Reference>,
/* private fields */
}Available on crate features
conversational-search-service or search-service only.Expand description
Summary with metadata 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.summary: StringSummary text with no citation information.
citation_metadata: Option<CitationMetadata>Citation metadata for given summary.
references: Vec<Reference>Document References.
Implementations§
Source§impl SummaryWithMetadata
impl SummaryWithMetadata
pub fn new() -> Self
Sourcepub fn set_summary<T: Into<String>>(self, v: T) -> Self
pub fn set_summary<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_citation_metadata<T>(self, v: T) -> Selfwhere
T: Into<CitationMetadata>,
pub fn set_citation_metadata<T>(self, v: T) -> Selfwhere
T: Into<CitationMetadata>,
Sets the value of citation_metadata.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::CitationMetadata;
let x = SummaryWithMetadata::new().set_citation_metadata(CitationMetadata::default()/* use setters */);Sourcepub fn set_or_clear_citation_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<CitationMetadata>,
pub fn set_or_clear_citation_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<CitationMetadata>,
Sets or clears the value of citation_metadata.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::CitationMetadata;
let x = SummaryWithMetadata::new().set_or_clear_citation_metadata(Some(CitationMetadata::default()/* use setters */));
let x = SummaryWithMetadata::new().set_or_clear_citation_metadata(None::<CitationMetadata>);Sourcepub fn set_references<T, V>(self, v: T) -> Self
pub fn set_references<T, V>(self, v: T) -> Self
Sets the value of references.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::Reference;
let x = SummaryWithMetadata::new()
.set_references([
Reference::default()/* use setters */,
Reference::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for SummaryWithMetadata
impl Clone for SummaryWithMetadata
Source§fn clone(&self) -> SummaryWithMetadata
fn clone(&self) -> SummaryWithMetadata
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 SummaryWithMetadata
impl Debug for SummaryWithMetadata
Source§impl Default for SummaryWithMetadata
impl Default for SummaryWithMetadata
Source§fn default() -> SummaryWithMetadata
fn default() -> SummaryWithMetadata
Returns the “default value” for a type. Read more
Source§impl Message for SummaryWithMetadata
impl Message for SummaryWithMetadata
Source§impl PartialEq for SummaryWithMetadata
impl PartialEq for SummaryWithMetadata
impl StructuralPartialEq for SummaryWithMetadata
Auto Trait Implementations§
impl Freeze for SummaryWithMetadata
impl RefUnwindSafe for SummaryWithMetadata
impl Send for SummaryWithMetadata
impl Sync for SummaryWithMetadata
impl Unpin for SummaryWithMetadata
impl UnwindSafe for SummaryWithMetadata
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