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: f32Confidence score of the match, ranging from 0 to 1.
name: &'a strThe 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: LicenseTypeThe type of the license that matched. Useful to know if the match was the complete text, a header, or something else.
data: &'a TextDataA 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> Freeze for Match<'a>
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more