Struct Capture
struct Capture { ... }
The high-level intermediate representation for a capturing group.
A capturing group always has an index and a child expression. It may
also have a name associated with it (e.g., (?P<foo>\w)), but it's not
necessary.
Note that there is no explicit representation of a non-capturing group
in a Hir. Instead, non-capturing grouping is handled automatically by
the recursive structure of the Hir itself.
Fields
index: u32The capture index of the capture.
name: Option<Box<str>>The name of the capture, if it exists.
sub: Box<Hir>The expression inside the capturing group, which may be empty.
Implementations
impl Clone for Capture
fn clone(self: &Self) -> Capture
impl Debug for Capture
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Capture
impl Freeze for Capture
impl PartialEq for Capture
fn eq(self: &Self, other: &Capture) -> bool
impl RefUnwindSafe for Capture
impl Send for Capture
impl StructuralPartialEq for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnsafeUnpin for Capture
impl UnwindSafe for Capture
impl<T> Any for Capture
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Capture
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Capture
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Capture
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Capture
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Capture
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Capture
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Capture
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Capture
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>