#[non_exhaustive]pub struct Summary {
pub summary_text: String,
pub summary_skipped_reasons: Vec<SummarySkippedReason>,
pub safety_attributes: Option<SafetyAttributes>,
pub summary_with_metadata: Option<SummaryWithMetadata>,
/* private fields */
}Available on crate features
conversational-search-service or search-service only.Expand description
Summary of the top N search results specified by the summary spec.
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_text: StringThe summary content.
summary_skipped_reasons: Vec<SummarySkippedReason>Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
safety_attributes: Option<SafetyAttributes>A collection of Safety Attribute categories and their associated confidence scores.
summary_with_metadata: Option<SummaryWithMetadata>Summary with metadata information.
Implementations§
Source§impl Summary
impl Summary
pub fn new() -> Self
Sourcepub fn set_summary_text<T: Into<String>>(self, v: T) -> Self
pub fn set_summary_text<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_summary_skipped_reasons<T, V>(self, v: T) -> Self
pub fn set_summary_skipped_reasons<T, V>(self, v: T) -> Self
Sets the value of summary_skipped_reasons.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::SummarySkippedReason;
let x = Summary::new().set_summary_skipped_reasons([
SummarySkippedReason::AdversarialQueryIgnored,
SummarySkippedReason::NonSummarySeekingQueryIgnored,
SummarySkippedReason::OutOfDomainQueryIgnored,
]);Sourcepub fn set_safety_attributes<T>(self, v: T) -> Selfwhere
T: Into<SafetyAttributes>,
pub fn set_safety_attributes<T>(self, v: T) -> Selfwhere
T: Into<SafetyAttributes>,
Sets the value of safety_attributes.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::SafetyAttributes;
let x = Summary::new().set_safety_attributes(SafetyAttributes::default()/* use setters */);Sourcepub fn set_or_clear_safety_attributes<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetyAttributes>,
pub fn set_or_clear_safety_attributes<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetyAttributes>,
Sets or clears the value of safety_attributes.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::SafetyAttributes;
let x = Summary::new().set_or_clear_safety_attributes(Some(SafetyAttributes::default()/* use setters */));
let x = Summary::new().set_or_clear_safety_attributes(None::<SafetyAttributes>);Sourcepub fn set_summary_with_metadata<T>(self, v: T) -> Selfwhere
T: Into<SummaryWithMetadata>,
pub fn set_summary_with_metadata<T>(self, v: T) -> Selfwhere
T: Into<SummaryWithMetadata>,
Sets the value of summary_with_metadata.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::SummaryWithMetadata;
let x = Summary::new().set_summary_with_metadata(SummaryWithMetadata::default()/* use setters */);Sourcepub fn set_or_clear_summary_with_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<SummaryWithMetadata>,
pub fn set_or_clear_summary_with_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<SummaryWithMetadata>,
Sets or clears the value of summary_with_metadata.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::search_response::summary::SummaryWithMetadata;
let x = Summary::new().set_or_clear_summary_with_metadata(Some(SummaryWithMetadata::default()/* use setters */));
let x = Summary::new().set_or_clear_summary_with_metadata(None::<SummaryWithMetadata>);Trait Implementations§
impl StructuralPartialEq for Summary
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnwindSafe for Summary
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