Enum rustc_expand::mbe::metavar_expr::MetaVarExpr
source · pub(crate) enum MetaVarExpr {
Count(Ident, Option<usize>),
Ignore(Ident),
Index(usize),
Length(usize),
}
Expand description
A meta-variable expression, for expansions based on properties of meta-variables.
Variants
Count(Ident, Option<usize>)
The number of repetitions of an identifier, optionally limited to a number
of outer-most repetition depths. If the depth limit is None
then the depth is unlimited.
Ignore(Ident)
Ignore a meta-variable for repetition without expansion.
Index(usize)
The index of the repetition at a particular depth, where 0 is the inner-most
repetition. The usize
is the depth.
Length(usize)
The length of the repetition at a particular depth, where 0 is the inner-most
repetition. The usize
is the depth.
Implementations
sourceimpl MetaVarExpr
impl MetaVarExpr
Trait Implementations
sourceimpl Clone for MetaVarExpr
impl Clone for MetaVarExpr
sourcefn clone(&self) -> MetaVarExpr
fn clone(&self) -> MetaVarExpr
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for MetaVarExpr
impl Debug for MetaVarExpr
sourceimpl PartialEq<MetaVarExpr> for MetaVarExpr
impl PartialEq<MetaVarExpr> for MetaVarExpr
sourcefn eq(&self, other: &MetaVarExpr) -> bool
fn eq(&self, other: &MetaVarExpr) -> bool
impl StructuralPartialEq for MetaVarExpr
Auto Trait Implementations
impl RefUnwindSafe for MetaVarExpr
impl !Send for MetaVarExpr
impl !Sync for MetaVarExpr
impl Unpin for MetaVarExpr
impl UnwindSafe for MetaVarExpr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Count
: 32 bytesIgnore
: 20 bytesIndex
: 16 bytesLength
: 16 bytes