#[non_exhaustive]pub enum Preset {
Confidence,
ConceptSearch,
Bm25,
Severity,
}Expand description
One of the auto-detected presets per §4.4.
--preset=NAME from the CLI bypasses detection and selects one of
these directly; matching on Preset::from_name is case-insensitive.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Confidence
Max ≤ 1.0, all values in [0, 1].
ConceptSearch
Max ≈ 1000 (within ±10%), no negatives.
Bm25
Long-tail, no upper bound, max far above p99.
Severity
Skewed, all small non-negative integers (treated as ordinal).
Implementations§
Source§impl Preset
impl Preset
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Kebab-case name used on the CLI and in envelope provenance.
§Examples
use face_core::detect::Preset;
assert_eq!(Preset::ConceptSearch.name(), "concept-search");Sourcepub fn from_name(name: &str) -> Option<Preset>
pub fn from_name(name: &str) -> Option<Preset>
Parse the kebab-case name supplied by --preset=. Case-insensitive.
Returns None for unknown names — the CLI wraps that in
crate::FaceError::ConflictingFlags (or similar) at the call site.
§Examples
use face_core::detect::Preset;
assert_eq!(Preset::from_name("BM25"), Some(Preset::Bm25));
assert_eq!(Preset::from_name("nope"), None);Trait Implementations§
impl Copy for Preset
impl Eq for Preset
impl StructuralPartialEq for Preset
Auto Trait Implementations§
impl Freeze for Preset
impl RefUnwindSafe for Preset
impl Send for Preset
impl Sync for Preset
impl Unpin for Preset
impl UnsafeUnpin for Preset
impl UnwindSafe for Preset
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