#[non_exhaustive]pub struct ArticleAnswer {
pub title: String,
pub uri: String,
pub snippets: Vec<String>,
pub confidence: f32,
pub metadata: HashMap<String, String>,
pub answer_record: String,
/* private fields */
}Available on crate features
answer-records or participants only.Expand description
Represents article answer.
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.title: StringThe article title.
uri: StringThe article URI.
snippets: Vec<String>Article snippets.
confidence: f32Article match confidence. The system’s confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
metadata: HashMap<String, String>A map that contains metadata about the answer and the document from which it originates.
answer_record: StringThe name of answer record, in the format of “projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>”
Implementations§
Source§impl ArticleAnswer
impl ArticleAnswer
pub fn new() -> Self
Sourcepub fn set_snippets<T, V>(self, v: T) -> Self
pub fn set_snippets<T, V>(self, v: T) -> Self
Sourcepub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
pub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
Sourcepub fn set_metadata<T, K, V>(self, v: T) -> Self
pub fn set_metadata<T, K, V>(self, v: T) -> Self
Sourcepub fn set_answer_record<T: Into<String>>(self, v: T) -> Self
pub fn set_answer_record<T: Into<String>>(self, v: T) -> Self
Sets the value of answer_record.
§Example
ⓘ
let x = ArticleAnswer::new().set_answer_record("example");Trait Implementations§
Source§impl Clone for ArticleAnswer
impl Clone for ArticleAnswer
Source§fn clone(&self) -> ArticleAnswer
fn clone(&self) -> ArticleAnswer
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 ArticleAnswer
impl Debug for ArticleAnswer
Source§impl Default for ArticleAnswer
impl Default for ArticleAnswer
Source§fn default() -> ArticleAnswer
fn default() -> ArticleAnswer
Returns the “default value” for a type. Read more
Source§impl Message for ArticleAnswer
impl Message for ArticleAnswer
Source§impl PartialEq for ArticleAnswer
impl PartialEq for ArticleAnswer
impl StructuralPartialEq for ArticleAnswer
Auto Trait Implementations§
impl Freeze for ArticleAnswer
impl RefUnwindSafe for ArticleAnswer
impl Send for ArticleAnswer
impl Sync for ArticleAnswer
impl Unpin for ArticleAnswer
impl UnwindSafe for ArticleAnswer
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