detect_text_candidate_and_encoding

Function detect_text_candidate_and_encoding 

Source
pub fn detect_text_candidate_and_encoding(
    source: &mut dyn DetectionSource,
    hint: Option<&DetectionHint>,
) -> Result<Option<(DetectionCandidate, Option<FormatId>)>>
Expand description

Performs complete text detection on a data source, returning a candidate if text is confirmed, together with the FormatId of the detected character encoding itself (without syntax-format overrides). The encoding format ID lets callers reason about encoding entailment (e.g. corroborating an extension candidate whose format implies a specific encoding); it is None when the detected encoding has no exact format catalog mapping.