pub struct PikeVM {
pub(crate) config: Config,
pub(crate) nfa: NFA,
pub(crate) wasm: CompiledRegex,
}
Expand description
A compiled regular expression represented as a Pike VM, ready for matching.
Fields§
§config: Config
§nfa: NFA
§wasm: CompiledRegex
Implementations§
Source§impl PikeVM
impl PikeVM
Sourcepub fn new(pattern: &str) -> Result<PikeVM, BuildError>
pub fn new(pattern: &str) -> Result<PikeVM, BuildError>
Compiles a single regular expression pattern into a new PikeVM
using
the default builder.
Sourcepub fn new_many<P: AsRef<str>>(patterns: &[P]) -> Result<PikeVM, BuildError>
pub fn new_many<P: AsRef<str>>(patterns: &[P]) -> Result<PikeVM, BuildError>
Compiles multiple regular expression patterns into a single new
PikeVM
using the default builder.
Sourcepub fn new_from_nfa(nfa: NFA) -> Result<PikeVM, BuildError>
pub fn new_from_nfa(nfa: NFA) -> Result<PikeVM, BuildError>
Creates a new PikeVM
directly from a Thompson NFA using the default
builder.
Sourcepub fn always_match() -> Result<PikeVM, BuildError>
pub fn always_match() -> Result<PikeVM, BuildError>
Creates a PikeVM
that always matches the empty string at any
position.
Sourcepub fn never_match() -> Result<PikeVM, BuildError>
pub fn never_match() -> Result<PikeVM, BuildError>
Creates a PikeVM
that never matches.
Sourcepub fn pattern_len(&self) -> usize
pub fn pattern_len(&self) -> usize
Returns the number of patterns compiled into this PikeVM.
Sourcepub fn get_config(&self) -> &Config
pub fn get_config(&self) -> &Config
Return the config for this PikeVM
.
Note that this is the configuration used to build the PikeVM, not necessarily the configuration used for a specific match operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PikeVM
impl RefUnwindSafe for PikeVM
impl Send for PikeVM
impl Sync for PikeVM
impl Unpin for PikeVM
impl UnwindSafe for PikeVM
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