#[non_exhaustive]pub struct AnswerSource {
pub title: String,
pub uri: String,
pub snippet: String,
pub metadata: Option<Struct>,
/* private fields */
}Available on crate feature
conversations only.Expand description
The sources of the answers.
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 title of the article.
uri: StringThe URI of the article.
snippet: StringThe relevant snippet of the article.
metadata: Option<Struct>Metadata associated with the article.
Implementations§
Source§impl AnswerSource
impl AnswerSource
pub fn new() -> Self
Sourcepub fn set_snippet<T: Into<String>>(self, v: T) -> Self
pub fn set_snippet<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_metadata<T>(self, v: T) -> Self
pub fn set_metadata<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for AnswerSource
impl Clone for AnswerSource
Source§fn clone(&self) -> AnswerSource
fn clone(&self) -> AnswerSource
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 AnswerSource
impl Debug for AnswerSource
Source§impl Default for AnswerSource
impl Default for AnswerSource
Source§fn default() -> AnswerSource
fn default() -> AnswerSource
Returns the “default value” for a type. Read more
Source§impl Message for AnswerSource
impl Message for AnswerSource
Source§impl PartialEq for AnswerSource
impl PartialEq for AnswerSource
impl StructuralPartialEq for AnswerSource
Auto Trait Implementations§
impl Freeze for AnswerSource
impl RefUnwindSafe for AnswerSource
impl Send for AnswerSource
impl Sync for AnswerSource
impl Unpin for AnswerSource
impl UnwindSafe for AnswerSource
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