pub enum Specificity {
ProductAndVersion,
ProductOnly,
ProtocolOnly,
Weak,
}Expand description
The confidence ladder. Every rule declares which rung it sits on, so scores across protocols mean the same thing and are auditable in one table rather than sprinkled as magic numbers through match arms (AC-4.11).
Variants§
ProductAndVersion
Product and version both extracted from a self-identifying banner.
ProductOnly
Product identified, version absent or unparseable.
ProtocolOnly
Protocol confirmed by structure, product unknown.
Weak
Consistent with the service but not conclusive.
Implementations§
Source§impl Specificity
impl Specificity
Sourcepub const ALL: [Self; 4]
pub const ALL: [Self; 4]
Every rung, in ladder order.
Exists so the exhaustiveness of the ladder is testable rather than
eyeballed: tests::every_rung_of_the_ladder_is_a_valid_confidence
walks this array, and tests::the_ladder_array_lists_every_variant
matches on each variant exhaustively, so adding a fifth rung without
adding it here fails to compile.
pub fn confidence(self) -> Confidence
Trait Implementations§
Source§impl Clone for Specificity
impl Clone for Specificity
Source§fn clone(&self) -> Specificity
fn clone(&self) -> Specificity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more