pub struct Literal {
pub expression: String,
pub flags: Flags,
pub id: Option<usize>,
pub som: Option<SomHorizon>,
}
Expand description
The pattern with pure literal expression.
Fields
expression: String
The expression to parse.
flags: Flags
Flags which modify the behaviour of the expression.
id: Option<usize>
ID number to be associated with the corresponding literal in the expressions array.
som: Option<SomHorizon>
The precision to track start of match offsets in stream state.
Implementations
sourceimpl Literal
impl Literal
sourcepub fn with_flags<S: Into<String>>(expr: S, flags: Flags) -> Result<Literal>
pub fn with_flags<S: Into<String>>(expr: S, flags: Flags) -> Result<Literal>
Construct a literal with expression and flags.
sourcepub fn multi_line(self) -> Self
pub fn multi_line(self) -> Self
Set multi-line anchoring.
sourcepub fn single_match(self) -> Self
pub fn single_match(self) -> Self
Set single-match only mode.
Trait Implementations
sourceimpl Builder for Literal
impl Builder for Literal
sourcefn for_platform<T: Mode>(
&self,
platform: Option<&PlatformRef>
) -> Result<Database<T>, Self::Err>
fn for_platform<T: Mode>(
&self,
platform: Option<&PlatformRef>
) -> Result<Database<T>, Self::Err>
The basic regular expression compiler.
/ This is the function call with which an expression is compiled into a Hyperscan database which can be passed to the runtime functions
sourceimpl FromIterator<Literal> for Literals
impl FromIterator<Literal> for Literals
sourcefn from_iter<T: IntoIterator<Item = Literal>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Literal>>(iter: T) -> Self
Creates a value from an iterator. Read more
impl Eq for Literal
impl StructuralEq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more