pub struct Subst<O: SubstParseContext> {
pub kw_span: Span,
pub sd: SubstDetails<O>,
}Fields§
§kw_span: Span§sd: SubstDetails<O>Might contain SD::when
Implementations§
Source§impl Subst<BooleanContext>
impl Subst<BooleanContext>
pub fn eval_bool<'c>(&self, gctx: GeneralContext<'c>) -> Result<bool>
Source§impl<O: SubstParseContext> Subst<O>
impl<O: SubstParseContext> Subst<O>
Sourcepub fn parse_entire(input: ParseStream<'_>) -> Result<Self>
pub fn parse_entire(input: ParseStream<'_>) -> Result<Self>
Parses everything including a $ (which we insist on)
Sourcefn parse_after_dollar(
la: Lookahead1<'_>,
input: ParseStream<'_>,
_deescaped: OrigDollarHandled,
) -> Result<Self>
fn parse_after_dollar( la: Lookahead1<'_>, input: ParseStream<'_>, _deescaped: OrigDollarHandled, ) -> Result<Self>
Parses everything after the $, possibly including a pair of { }
You must have called deescape_orig_dollar,
and handled the $$ case.
Trait Implementations§
Source§impl<O: SubstParseContext> AnalyseRepeat for Subst<O>
impl<O: SubstParseContext> AnalyseRepeat for Subst<O>
fn analyse_repeat(&self, visitor: &mut RepeatAnalysisVisitor) -> Result<()>
Source§impl<O: SubstParseContext> FindRecogMetas for Subst<O>
impl<O: SubstParseContext> FindRecogMetas for Subst<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 Subst<O>
Parses only the content (ie, after the $ and inside any { })
impl<O: SubstParseContext> Parse for Subst<O>
Parses only the content (ie, after the $ and inside any { })
fn parse<'i>(input: ParseStream<'i>) -> Result<Self>
Auto Trait Implementations§
impl<O> Freeze for Subst<O>where
<O as SubstParseContext>::NotInBool: Freeze,
<O as SubstParseContext>::NotInPaste: Freeze,
<O as SubstParseContext>::BoolOnly: Freeze,
<O as SubstParseContext>::NotInConcat: Freeze,
impl<O> RefUnwindSafe for Subst<O>where
<O as SubstParseContext>::NotInBool: RefUnwindSafe,
<O as SubstParseContext>::NotInPaste: RefUnwindSafe,
<O as SubstParseContext>::BoolOnly: RefUnwindSafe,
<O as SubstParseContext>::NotInConcat: RefUnwindSafe,
<O as SubstParseContext>::DbgContent: RefUnwindSafe,
impl<O> !Send for Subst<O>
impl<O> !Sync for Subst<O>
impl<O> Unpin for Subst<O>where
<O as SubstParseContext>::NotInBool: Unpin,
<O as SubstParseContext>::NotInPaste: Unpin,
<O as SubstParseContext>::BoolOnly: Unpin,
<O as SubstParseContext>::NotInConcat: Unpin,
impl<O> UnwindSafe for Subst<O>where
<O as SubstParseContext>::NotInBool: UnwindSafe,
<O as SubstParseContext>::NotInPaste: UnwindSafe,
<O as SubstParseContext>::BoolOnly: UnwindSafe,
<O as SubstParseContext>::NotInConcat: 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