#[non_exhaustive]pub struct SearchAnswer {
pub criteria: Vec<Criterion>,
pub matches: u32,
pub results: Vec<MotorRecord>,
pub source_url: Option<String>,
}Expand description
A search’s 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.criteria: Vec<Criterion>Each criterion asked, with how many motors it matches alone.
matches: u32How many motors match every criterion: more than SearchAnswer::results holds when the
search’s maxResults cut it short.
results: Vec<MotorRecord>The motors returned.
source_url: Option<String>The page of the site’s own search.
Implementations§
Source§impl SearchAnswer
impl SearchAnswer
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether it holds every motor that matched.
Trait Implementations§
Source§impl Clone for SearchAnswer
impl Clone for SearchAnswer
Source§fn clone(&self) -> SearchAnswer
fn clone(&self) -> SearchAnswer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SearchAnswer
impl Debug for SearchAnswer
Source§impl<'de> Deserialize<'de> for SearchAnswer
impl<'de> Deserialize<'de> for SearchAnswer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SearchAnswer
impl PartialEq for SearchAnswer
Source§fn eq(&self, other: &SearchAnswer) -> bool
fn eq(&self, other: &SearchAnswer) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SearchAnswer
impl Serialize for SearchAnswer
impl StructuralPartialEq for SearchAnswer
Auto Trait Implementations§
impl Freeze for SearchAnswer
impl RefUnwindSafe for SearchAnswer
impl Send for SearchAnswer
impl Sync for SearchAnswer
impl Unpin for SearchAnswer
impl UnsafeUnpin for SearchAnswer
impl UnwindSafe for SearchAnswer
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