pub struct PostProcessedMatch {
pub pattern_id: u32,
pub start: u32,
pub end: u32,
pub entropy_bits_per_byte: f32,
pub confidence: f32,
}Expand description
Output of try_reference_post_process. Carries the deduped match and the
two derived signals every downstream consumer reads.
Fields§
§pattern_id: u32Pattern id from the original Match.
start: u32Inclusive start byte offset.
end: u32Exclusive end byte offset.
entropy_bits_per_byte: f32Shannon entropy in bits/byte over haystack[start..end]. 0.0
for zero-width matches.
confidence: f32[0.0, 1.0] confidence score combining length + entropy.
Specifically min(1, len/16) * (entropy / 8) - the same
heuristic a scan consumer’s per-match scorer applies. The factor of 16
matches the typical AKIA / ghp_ token width; entropy is
normalised against the 8 bits/byte ceiling for binary-uniform
data.
Trait Implementations§
Source§impl Clone for PostProcessedMatch
impl Clone for PostProcessedMatch
Source§fn clone(&self) -> PostProcessedMatch
fn clone(&self) -> PostProcessedMatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PostProcessedMatch
Source§impl Debug for PostProcessedMatch
impl Debug for PostProcessedMatch
Source§impl PartialEq for PostProcessedMatch
impl PartialEq for PostProcessedMatch
impl StructuralPartialEq for PostProcessedMatch
Auto Trait Implementations§
impl Freeze for PostProcessedMatch
impl RefUnwindSafe for PostProcessedMatch
impl Send for PostProcessedMatch
impl Sync for PostProcessedMatch
impl Unpin for PostProcessedMatch
impl UnsafeUnpin for PostProcessedMatch
impl UnwindSafe for PostProcessedMatch
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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