pub struct Regexp<'src> {
pub literal: &'src str,
pub src: &'src str,
pub case_insensitive: bool,
pub dot_matches_new_line: bool,
/* private fields */
}
Expand description
A regular expression in a YARA rule.
Used both as part of a RegexpPattern
and as the right operand
of a matches
operator.
Fields§
§literal: &'src str
The regular expressions as it appears in the source code, including
the opening and closing slashes (/
), and the modifiers i
and s
,
if they are present.
src: &'src str
The regexp source code. Doesn’t include the opening and closing /
.
case_insensitive: bool
True if the regular expression was followed by /i
dot_matches_new_line: bool
True if the regular expression was followed by /s
Trait Implementations§
Auto Trait Implementations§
impl<'src> Freeze for Regexp<'src>
impl<'src> RefUnwindSafe for Regexp<'src>
impl<'src> Send for Regexp<'src>
impl<'src> Sync for Regexp<'src>
impl<'src> Unpin for Regexp<'src>
impl<'src> UnwindSafe for Regexp<'src>
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> 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