pub struct Email;Available on crate feature
demo only.Expand description
A macro-generated regular expression matching the pattern: (\w+)@(?<domain>(\w+)(\.\w+)?) with flags: []. See the Regex trait for associated matching and capturing functions.
Trait Implementations§
Source§impl Regex<char, 5> for Email
impl Regex<char, 5> for Email
type Pattern = Then<char, CaptureGroup<char, QuantifierNOrMore<char, Or4<char, ScalarRange<'0', '9'>, ScalarRange<'A', 'Z'>, Scalar<'_'>, ScalarRange<'a', 'z'>>, 1>, 1>, Then<char, Scalar<'@'>, CaptureGroup<char, Then<char, CaptureGroup<char, QuantifierNOrMore<char, Or4<char, ScalarRange<'0', '9'>, ScalarRange<'A', 'Z'>, Scalar<'_'>, ScalarRange<'a', 'z'>>, 1>, 3>, QuantifierNToM<char, CaptureGroup<char, Then<char, Scalar<'.'>, QuantifierNOrMore<char, Or4<char, ScalarRange<'0', '9'>, ScalarRange<'A', 'Z'>, Scalar<'_'>, ScalarRange<'a', 'z'>>, 1>>, 4>, 0, 1>>, 2>>>
type Capture<'a, H: Haystack<'a>> = EmailCapture<'a, H>
Source§fn is_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
fn is_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
Returns
true if this Regex matches the entire haystack provided. This should probably
be the default matching function to use. Read moreSource§fn contains_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
fn contains_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
Returns
true if this Regex matches any substring of the haystack provided. To retrieve the
actual substring itself, use slice_matching or
find_capture. Read moreSource§fn slice_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
fn slice_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
Returns the slice that matches this Regex first. This is the slicing variant of
contains_match. Read moreSource§fn slice_all_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
fn slice_all_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
Returns all slices of the provided haystack that match this Regex, optionally
overlapping. Read moreSource§fn do_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
fn do_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
Returns a
Self::Capture representing the provided haystack matched against this Regex.
This includes any named or numbered capturing groups in the expression. As with
is_match, this function acts on the entire haystack, and needs to match
every character from start to end. Read moreSource§fn find_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
fn find_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
Returns the
Self::Capture that matches this Regex first, similar to
slice_matching but with any named or numbered groups included. Read moreSource§fn find_all_captures<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
fn find_all_captures<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
Returns a
Self::Capture representing every full match of this Regex in the provided
haystack, similar to slice_all_matching. This can optionally
include overlapping matches.Source§impl Regex<u8, 5> for Email
impl Regex<u8, 5> for Email
type Pattern = Then<u8, CaptureGroup<u8, QuantifierNOrMore<u8, Or4<u8, ByteRange<48, 57>, ByteRange<65, 90>, Byte<95>, ByteRange<97, 122>>, 1>, 1>, Then<u8, Byte<64>, CaptureGroup<u8, Then<u8, CaptureGroup<u8, QuantifierNOrMore<u8, Or4<u8, ByteRange<48, 57>, ByteRange<65, 90>, Byte<95>, ByteRange<97, 122>>, 1>, 3>, QuantifierNToM<u8, CaptureGroup<u8, Then<u8, Byte<46>, QuantifierNOrMore<u8, Or4<u8, ByteRange<48, 57>, ByteRange<65, 90>, Byte<95>, ByteRange<97, 122>>, 1>>, 4>, 0, 1>>, 2>>>
type Capture<'a, H: Haystack<'a>> = EmailCapture<'a, H>
Source§fn is_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
fn is_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
Returns
true if this Regex matches the entire haystack provided. This should probably
be the default matching function to use. Read moreSource§fn contains_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
fn contains_match<'a, H>(hay: impl IntoHaystack<'a, H>) -> boolwhere
H: HaystackOf<'a, I>,
Returns
true if this Regex matches any substring of the haystack provided. To retrieve the
actual substring itself, use slice_matching or
find_capture. Read moreSource§fn slice_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
fn slice_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
Returns the slice that matches this Regex first. This is the slicing variant of
contains_match. Read moreSource§fn slice_all_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
fn slice_all_matching<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<<H as HaystackIter<'a>>::Slice>where
H: HaystackOf<'a, I>,
Returns all slices of the provided haystack that match this Regex, optionally
overlapping. Read moreSource§fn do_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
fn do_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
Returns a
Self::Capture representing the provided haystack matched against this Regex.
This includes any named or numbered capturing groups in the expression. As with
is_match, this function acts on the entire haystack, and needs to match
every character from start to end. Read moreSource§fn find_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
fn find_capture<'a, H>(
hay: impl IntoHaystack<'a, H>,
) -> Option<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
Returns the
Self::Capture that matches this Regex first, similar to
slice_matching but with any named or numbered groups included. Read moreSource§fn find_all_captures<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
fn find_all_captures<'a, H>(
hay: impl IntoHaystack<'a, H>,
overlapping: bool,
) -> Vec<Self::Capture<'a, H>>where
H: HaystackOf<'a, I>,
Returns a
Self::Capture representing every full match of this Regex in the provided
haystack, similar to slice_all_matching. This can optionally
include overlapping matches.Auto Trait Implementations§
impl Freeze for Email
impl RefUnwindSafe for Email
impl Send for Email
impl Sync for Email
impl Unpin for Email
impl UnwindSafe for Email
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