pub struct MatchData { /* private fields */ }
Implementations
sourceimpl MatchData
impl MatchData
pub fn new<R>(haystack: Vec<u8>, regexp: Regexp, bounds: R) -> Self where
R: RangeBounds<usize>,
pub fn set_region<R>(&mut self, bounds: R) where
R: RangeBounds<usize>,
pub fn matched_region(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn begin(&self, capture: Capture<'_>) -> Result<Option<usize>, Error>
pub fn capture_at(&self, at: CaptureAt<'_>) -> Result<CaptureMatch, Error>
pub fn captures(&self) -> Result<Option<Vec<Option<Vec<u8>>>>, Error>
pub fn end(&self, capture: Capture<'_>) -> Result<Option<usize>, Error>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> Result<usize, Error>
pub fn named_captures(
&self
) -> Result<Option<HashMap<Vec<u8>, NilableString>>, Error>
pub fn names(&self) -> Vec<Vec<u8>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn offset(&self, capture: Capture<'_>) -> Result<Option<[usize; 2]>, Error>
pub fn pre(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn post(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn regexp(&self) -> &Regexp
pub fn regexp_mut(&mut self) -> &mut Regexp
pub fn string(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn to_a(&self) -> Result<Option<Vec<NilableString>>, Error>
pub fn to_s(&self) -> Result<Option<&[u8]>, Error>
Trait Implementations
impl Eq for MatchData
impl StructuralEq for MatchData
impl StructuralPartialEq for MatchData
Auto Trait Implementations
impl !RefUnwindSafe for MatchData
impl !Send for MatchData
impl !Sync for MatchData
impl Unpin for MatchData
impl !UnwindSafe for MatchData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more