pub struct Candidate<F> {
pub mbid: String,
pub name: String,
pub score: u8,
pub facts: F,
}Expand description
One answer among the several a search returns.
Fields§
§mbid: StringThe MusicBrainz identifier, which is what makes a later fetch an update rather than a second opinion.
name: StringName or title as MusicBrainz spells it, for the reader to judge.
score: u8Whatever the search decided about relevance, 0 to 100.
Not a probability, and not a confidence. It says how well the query
matched the index, so a library holding one album by an obscure band
gets a 100 for the only thing that answered. It is one input to
best_match, never the verdict.
facts: FWhat was said, ready to be stored.
Trait Implementations§
impl<F: Eq> Eq for Candidate<F>
impl<F> StructuralPartialEq for Candidate<F>
Auto Trait Implementations§
impl<F> Freeze for Candidate<F>where
F: Freeze,
impl<F> RefUnwindSafe for Candidate<F>where
F: RefUnwindSafe,
impl<F> Send for Candidate<F>where
F: Send,
impl<F> Sync for Candidate<F>where
F: Sync,
impl<F> Unpin for Candidate<F>where
F: Unpin,
impl<F> UnwindSafe for Candidate<F>where
F: UnwindSafe,
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