pub struct SigmaString {
pub parts: Vec<StringPart>,
pub original: String,
}Expand description
A Sigma string value that may contain wildcards.
When Sigma rules specify string values, * and ? are interpreted as
wildcards unless escaped with \. This type preserves the structure so
downstream consumers (evaluators, converters) can handle wildcards
appropriately.
§Escape semantics
Backslash (\) is the escape character. Its behavior depends on what follows:
| Input | Parsed as | Rationale |
|---|---|---|
\* | literal * | Escapes the wildcard — backslash consumed |
\? | literal ? | Escapes the wildcard — backslash consumed |
\\ | literal \ | Escapes itself — backslash consumed |
\W | literal \W (both kept) | Non-special char — backslash preserved |
This matches the pySigma SigmaString behavior: backslash only consumes
itself when followed by a Sigma-special character (*, ?, \).
Before non-special characters it is treated as a literal backslash,
which is important for patterns like \Windows\ in file paths.
Fields§
§parts: Vec<StringPart>§original: StringImplementations§
Source§impl SigmaString
impl SigmaString
Trait Implementations§
Source§impl Clone for SigmaString
impl Clone for SigmaString
Source§fn clone(&self) -> SigmaString
fn clone(&self) -> SigmaString
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SigmaString
impl Debug for SigmaString
Source§impl Display for SigmaString
impl Display for SigmaString
Source§impl PartialEq for SigmaString
impl PartialEq for SigmaString
Source§impl Serialize for SigmaString
impl Serialize for SigmaString
impl Eq for SigmaString
impl StructuralPartialEq for SigmaString
Auto Trait Implementations§
impl Freeze for SigmaString
impl RefUnwindSafe for SigmaString
impl Send for SigmaString
impl Sync for SigmaString
impl Unpin for SigmaString
impl UnsafeUnpin for SigmaString
impl UnwindSafe for SigmaString
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.