Struct regex_syntax::ast::CaptureName
source · pub struct CaptureName {
pub span: Span,
pub name: String,
pub index: u32,
}
Expand description
A capture name.
This corresponds to the name itself between the angle brackets in, e.g.,
(?P<foo>expr)
.
Fields§
§span: Span
The span of this capture name.
name: String
The capture name.
index: u32
The capture index.
Trait Implementations§
source§impl Arbitrary<'_> for CaptureName
Available on crate feature arbitrary
only.
impl Arbitrary<'_> for CaptureName
Available on crate feature
arbitrary
only.source§fn arbitrary(u: &mut Unstructured<'_>) -> Result<CaptureName>
fn arbitrary(u: &mut Unstructured<'_>) -> Result<CaptureName>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for CaptureName
impl Clone for CaptureName
source§fn clone(&self) -> CaptureName
fn clone(&self) -> CaptureName
Returns a copy 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 moresource§impl Debug for CaptureName
impl Debug for CaptureName
source§impl PartialEq<CaptureName> for CaptureName
impl PartialEq<CaptureName> for CaptureName
source§fn eq(&self, other: &CaptureName) -> bool
fn eq(&self, other: &CaptureName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CaptureName
impl StructuralEq for CaptureName
impl StructuralPartialEq for CaptureName
Auto Trait Implementations§
impl RefUnwindSafe for CaptureName
impl Send for CaptureName
impl Sync for CaptureName
impl Unpin for CaptureName
impl UnwindSafe for CaptureName
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