pub struct Match<'a> {
pub score: f32,
pub name: &'a str,
pub license_type: LicenseType,
pub data: &'a TextData,
}
Expand description
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: &'a str
The name of the closest matching license in the Store
. This will
always be something that exists in the store, regardless of the score.
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
Auto Trait Implementations
impl<'a> RefUnwindSafe for Match<'a>
impl<'a> Send for Match<'a>
impl<'a> Sync for Match<'a>
impl<'a> Unpin for Match<'a>
impl<'a> UnwindSafe for Match<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more