pub struct Argument<O: SubstParseContext = TokenAccumulator>(pub Template<O>);Expand description
ARG as per
“Named and positional template arguments”
in the reference.
Parses from one of
- identifier
- literal
$EXPN${EXPN..}{ TEMPLATE }
Tuple Fields§
§0: Template<O>Implementations§
Source§impl Argument<TokenAccumulator>
impl Argument<TokenAccumulator>
pub fn span_from_arg(&self, gctx: GeneralContext<'_>) -> Result<Span>
Trait Implementations§
Source§impl<O: SubstParseContext> Deref for Argument<O>
impl<O: SubstParseContext> Deref for Argument<O>
Source§impl<O: SubstParseContext> FindRecogMetas for Argument<O>
impl<O: SubstParseContext> FindRecogMetas for Argument<O>
Source§fn find_recog_metas(&self, acc: &mut Recognised)
fn find_recog_metas(&self, acc: &mut Recognised)
Search for
fmeta(..) etc. expansions Read moreSource§impl<O: SubstParseContext> Parse for Argument<O>
impl<O: SubstParseContext> Parse for Argument<O>
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl<O> Freeze for Argument<O>
impl<O> RefUnwindSafe for Argument<O>where
<O as SubstParseContext>::NotInConcat: RefUnwindSafe,
<O as SubstParseContext>::NotInPaste: RefUnwindSafe,
<O as SubstParseContext>::NotInBool: RefUnwindSafe,
<O as SubstParseContext>::BoolOnly: RefUnwindSafe,
<O as SubstParseContext>::DbgContent: RefUnwindSafe,
impl<O = TokenAccumulator> !Send for Argument<O>
impl<O = TokenAccumulator> !Sync for Argument<O>
impl<O> Unpin for Argument<O>where
<O as SubstParseContext>::NotInConcat: Unpin,
<O as SubstParseContext>::NotInPaste: Unpin,
<O as SubstParseContext>::NotInBool: Unpin,
<O as SubstParseContext>::BoolOnly: Unpin,
impl<O> UnwindSafe for Argument<O>where
<O as SubstParseContext>::NotInConcat: UnwindSafe,
<O as SubstParseContext>::NotInPaste: UnwindSafe,
<O as SubstParseContext>::NotInBool: UnwindSafe,
<O as SubstParseContext>::BoolOnly: UnwindSafe,
<O as SubstParseContext>::DbgContent: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more