pub struct EmailCapture<'a, H: Haystack<'a>>(pub H, _, _, _, _, _, _);Available on crate feature
demo only.Expand description
A macro-generated type that holds 5 captures for the associated regex, Email. If present, named groups can be retrieved through their associated method.
Capture types include methods to retrieve individual captures as a slice of the original haystack, or as the underlying Range<usize>, which can be used to manually slice the haystack (without risk of panicking in the case of &str).
As is common with regular expressions, group 0 refers to the whole match (and is therefore aliased as EmailCapture::whole_match).
Tuple Fields§
§0: HImplementations§
Source§impl<'a, H: Haystack<'a>> EmailCapture<'a, H>
impl<'a, H: Haystack<'a>> EmailCapture<'a, H>
pub fn cap_0(&self) -> H::Slice
pub fn cap_0_range(&'a self) -> &'a Range<usize>
pub fn cap_1(&self) -> H::Slice
pub fn cap_1_range(&'a self) -> &'a Range<usize>
pub fn cap_2(&self) -> H::Slice
pub fn cap_2_range(&'a self) -> &'a Range<usize>
pub fn cap_3(&self) -> H::Slice
pub fn cap_3_range(&'a self) -> &'a Range<usize>
pub fn cap_4(&self) -> Option<H::Slice>
pub fn cap_4_range(&'a self) -> Option<&'a Range<usize>>
pub fn whole_match(&self) -> H::Slice
pub fn whole_match_range(&'a self) -> &'a Range<usize>
pub fn domain(&self) -> H::Slice
pub fn domain_range(&'a self) -> &'a Range<usize>
Trait Implementations§
Source§impl<'a, H: Haystack<'a>> CaptureFromRanges<'a, H, 5> for EmailCapture<'a, H>
impl<'a, H: Haystack<'a>> CaptureFromRanges<'a, H, 5> for EmailCapture<'a, H>
Source§impl<'a, H: Clone + Haystack<'a>> Clone for EmailCapture<'a, H>
impl<'a, H: Clone + Haystack<'a>> Clone for EmailCapture<'a, H>
Source§fn clone(&self) -> EmailCapture<'a, H>
fn clone(&self) -> EmailCapture<'a, H>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, H> Freeze for EmailCapture<'a, H>where
H: Freeze,
impl<'a, H> RefUnwindSafe for EmailCapture<'a, H>where
H: RefUnwindSafe,
impl<'a, H> Send for EmailCapture<'a, H>where
H: Send,
impl<'a, H> Sync for EmailCapture<'a, H>where
H: Sync,
impl<'a, H> Unpin for EmailCapture<'a, H>where
H: Unpin,
impl<'a, H> UnwindSafe for EmailCapture<'a, H>where
H: UnwindSafe,
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