Skip to content

[Rust] Add SearchQuery::search_type and detect_mode - #8726

Open
jrozner wants to merge 1 commit into
Vector35:devfrom
jrozner:rust-search-query-search-type
Open

jrozner wants to merge 1 commit into
Vector35:devfrom
jrozner:rust-search-query-search-type

Conversation

@jrozner

@jrozner jrozner commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

SearchQuery had no way to set the query's searchType, which forces the
parser a pattern is read with (flexhex, yara, regex or raw) instead of
auto-detecting it, as Python's search(mode=...) does. Add it as a
SearchType enum serialized to those names, set with search_type().

detect_mode() wraps BNDetectSearchMode, returning the name of the
parser the core would use, or its error when the pattern doesn't
parse, like Python's detect_search_mode.

SearchQuery had no way to set the query's searchType, which forces the
parser a pattern is read with (flexhex, yara, regex or raw) instead of
auto-detecting it, as Python's search(mode=...) does. Add it as a
SearchType enum serialized to those names, set with search_type().

detect_mode() wraps BNDetectSearchMode, returning the name of the
parser the core would use, or its error when the pattern doesn't
parse, like Python's detect_search_mode.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant