We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdfdafe commit 6c42de1Copy full SHA for 6c42de1
src/raw/elem.rs
@@ -362,7 +362,7 @@ pub struct RawRegex<'a> {
362
}
363
364
impl<'a> RawRegex<'a> {
365
- pub fn new(data: &'a [u8]) -> RawResult<RawRegex<'a>> {
+ pub(super) fn new(data: &'a [u8]) -> RawResult<RawRegex<'a>> {
366
let pattern = read_nullterminated(data)?;
367
let opts = read_nullterminated(&data[pattern.len() + 1..])?;
368
if pattern.len() + opts.len() == data.len() - 2 {
@@ -377,10 +377,12 @@ impl<'a> RawRegex<'a> {
377
378
379
380
+ /// Gets the pattern portion of the regex.
381
pub fn pattern(self) -> &'a str {
382
self.pattern
383
384
385
+ /// Gets the options portion of the regex.
386
pub fn options(self) -> &'a str {
387
self.options
388
0 commit comments