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

Confidence score of the match, ranging from 0 to 1.

The name of the closest matching license in the Store. This will always be something that exists in the store, regardless of the score.

Deprecated

Alternate names for the matched license.

To be removed in favor of looking up aliases in the store as-needed.

The type of the license that matched. Useful to know if the match was the complete text, a header, or something else.

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for Match<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Match<'a>

impl<'a> Sync for Match<'a>