#[non_exhaustive]pub struct Answer {
pub answer_text: String,
pub citations: Vec<AnswerCitation>,
pub references: Vec<AnswerReference>,
/* private fields */
}Expand description
An answer to a query.
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.answer_text: StringContains the text of the answer.
citations: Vec<AnswerCitation>Output only. Contains citations for the answer.
references: Vec<AnswerReference>Output only. Contains references for the answer.
Implementations§
Source§impl Answer
impl Answer
Sourcepub fn set_answer_text<T: Into<String>>(self, v: T) -> Self
pub fn set_answer_text<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_citations<T, V>(self, v: T) -> Self
pub fn set_citations<T, V>(self, v: T) -> Self
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_developers_knowledge_v1::model::answer::AnswerReference;
let x = Answer::new()
.set_references([
AnswerReference::default()/* use setters */,
AnswerReference::default()/* use (different) setters */,
]);Trait Implementations§
impl StructuralPartialEq for Answer
Auto Trait Implementations§
impl Freeze for Answer
impl RefUnwindSafe for Answer
impl Send for Answer
impl Sync for Answer
impl Unpin for Answer
impl UnsafeUnpin for Answer
impl UnwindSafe for Answer
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