Struct askalono::Match [−][src]
pub struct Match<'a> { pub score: f32, pub name: String, pub aliases: Vec<String>, pub license_type: LicenseType, pub data: &'a TextData, }
Information about text that was compared against licenses in the store.
This only contains information about the overall match; to uncover more
data you can run methods like optimize_bounds
on TextData
.
Its lifetime is tied to the lifetime of the Store
it was generated from.
Fields
score: f32
Confidence score of the match, ranging from 0 to 1.
name: String
The name of the closest matching license in the Store
. This will
always be something that exists in the store, regardless of the score.
aliases: Vec<String>
Alternate names for the matched license.
To be removed in favor of looking up aliases in the store as-needed.
license_type: LicenseType
The type of the license that matched. Useful to know if the match was the complete text, a header, or something else.
data: &'a TextData
A reference to the license data that matched inside the Store
. May be
useful for diagnostic purposes or to further optimize the result.
Trait Implementations
impl<'a> Clone for Match<'a>
[src]
impl<'a> Clone for Match<'a>
fn clone(&self) -> Match<'a>
[src]
fn clone(&self) -> Match<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a> Debug for Match<'a>
[src]
impl<'a> Debug for Match<'a>