hs_expr_ext_t

Type Alias hs_expr_ext_t 

Source
pub type hs_expr_ext_t = hs_expr_ext;
Expand description

A structure containing additional parameters related to an expression, passed in at build time to @ref hs_compile_ext_multi() or @ref hs_expression_ext_info.

These parameters allow the set of matches produced by a pattern to be constrained at compile time, rather than relying on the application to process unwanted matches at runtime.

Aliased Type§

#[repr(C)]
pub struct hs_expr_ext_t { pub flags: u64, pub min_offset: u64, pub max_offset: u64, pub min_length: u64, pub edit_distance: u32, pub hamming_distance: u32, }

Fields§

§flags: u64

Flags governing which parts of this structure are to be used by the compiler. See @ref HS_EXT_FLAG.

§min_offset: u64

The minimum end offset in the data stream at which this expression should match successfully. To use this parameter, set the @ref HS_EXT_FLAG_MIN_OFFSET flag in the hs_expr_ext::flags field.

§max_offset: u64

The maximum end offset in the data stream at which this expression should match successfully. To use this parameter, set the @ref HS_EXT_FLAG_MAX_OFFSET flag in the hs_expr_ext::flags field.

§min_length: u64

The minimum match length (from start to end) required to successfully match this expression. To use this parameter, set the @ref HS_EXT_FLAG_MIN_LENGTH flag in the hs_expr_ext::flags field.

§edit_distance: u32

Allow patterns to approximately match within this edit distance. To use this parameter, set the @ref HS_EXT_FLAG_EDIT_DISTANCE flag in the hs_expr_ext::flags field.

§hamming_distance: u32

Allow patterns to approximately match within this Hamming distance. To use this parameter, set the @ref HS_EXT_FLAG_HAMMING_DISTANCE flag in the hs_expr_ext::flags field.