Struct posix_regex::compile::PosixRegexBuilder
source · pub struct PosixRegexBuilder<'a> { /* private fields */ }
Expand description
A regex builder struct
Implementations
sourceimpl<'a> PosixRegexBuilder<'a>
impl<'a> PosixRegexBuilder<'a>
sourcepub fn new(input: &'a [u8]) -> Self
pub fn new(input: &'a [u8]) -> Self
Create a new instance that is ready to parse the regex input
sourcepub fn with_class(self, name: &'a [u8], callback: fn(_: u8) -> bool) -> Self
pub fn with_class(self, name: &'a [u8], callback: fn(_: u8) -> bool) -> Self
Add a custom collation class, for use within square brackets (such as [[:digit:]]
)
sourcepub fn with_default_classes(self) -> Self
pub fn with_default_classes(self) -> Self
Add all the default collation classes, like [[:digit:]]
and [[:alnum:]]
sourcepub fn compile(self) -> Result<PosixRegex<'static>, Error>
pub fn compile(self) -> Result<PosixRegex<'static>, Error>
“Compile” this regex to a struct ready to match input
pub fn compile_tokens(self) -> Result<Tree, Error>
Auto Trait Implementations
impl<'a> RefUnwindSafe for PosixRegexBuilder<'a>
impl<'a> Send for PosixRegexBuilder<'a>
impl<'a> Sync for PosixRegexBuilder<'a>
impl<'a> Unpin for PosixRegexBuilder<'a>
impl<'a> UnwindSafe for PosixRegexBuilder<'a>
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