Struct CaptureName

pub struct CaptureName { pub span: Span, pub name: String, pub index: u32 }

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

impl Clone for CaptureName

fn clone(&self) -> Self

impl Debug for CaptureName

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for CaptureName

impl PartialEq for CaptureName

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for CaptureName

Auto Trait Implementations

impl Freeze for CaptureName

impl RefUnwindSafe for CaptureName

impl Send for CaptureName

impl Sync for CaptureName

impl Unpin for CaptureName

impl UnsafeUnpin for CaptureName

impl UnwindSafe for CaptureName

Blanket Implementations

impl<T> Any for CaptureName where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for CaptureName where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for CaptureName where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for CaptureName where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for CaptureName

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for CaptureName where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for CaptureName where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for CaptureName where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for CaptureName where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>