pub struct BooleanContext(Void);Expand description
Implementor of SubstParseContext for booleans
No values of this type are ever created - it’s just a generic parameter, used to select the associated marker types (and their constructor methods( in SubstParseContext.
So it can be uninhabited.
Tuple Fields§
§0: VoidTrait Implementations§
Source§impl Debug for BooleanContext
impl Debug for BooleanContext
Source§impl SubstParseContext for BooleanContext
impl SubstParseContext for BooleanContext
Source§type NotInPaste = ()
type NotInPaste = ()
Uninhabited iff this lexical context is within
${paste }Source§type NotInConcat = ()
type NotInConcat = ()
Uninhabited iff this lexical context is within
${concat }Source§type ConcatOnly = Void
type ConcatOnly = Void
Uninhabited unless this lexical context is within
${concat }Source§type DbgContent = Subst<BooleanContext>
type DbgContent = Subst<BooleanContext>
Content of the
dbg keyword Read moreSource§type SpecialParseContext = ()
type SpecialParseContext = ()
For communicating through
parse_special Read morefn not_in_paste(_: &impl Spanned) -> Result<()>
fn not_in_concat(_: &impl Spanned) -> Result<()>
fn bool_only(_: &impl Spanned) -> Result<()>
Source§fn meta_recog_usage(_: &SubstMeta<Self>) -> UsageInfo<IsUsed>
fn meta_recog_usage(_: &SubstMeta<Self>) -> UsageInfo<IsUsed>
When we find a
fmeta etc. in this context, does it allow a value? Read morefn not_in_bool(span: &impl Spanned) -> Result<Void>
Source§fn missing_keyword_arguments(kw_span: Span) -> Result<Void>
fn missing_keyword_arguments(kw_span: Span) -> Result<Void>
Return an error suitable for reporting missing arguments Read more
fn concat_only(span: &impl Spanned) -> Result<Self::ConcatOnly>
Source§fn parse_maybe_within_parens<T>(
input: ParseStream<'_>,
f: impl FnOnce(ParseStream<'_>) -> Result<T>,
) -> Result<T>
fn parse_maybe_within_parens<T>( input: ParseStream<'_>, f: impl FnOnce(ParseStream<'_>) -> Result<T>, ) -> Result<T>
Parse using
f, within parens in boolean context, not otherwise Read moreSource§fn parse_maybe_comma(input: ParseStream<'_>) -> Result<()>
fn parse_maybe_comma(input: ParseStream<'_>) -> Result<()>
Parse maybe a comma (comma in boolean contegxt, not otherwise) Read more
Auto Trait Implementations§
impl Freeze for BooleanContext
impl RefUnwindSafe for BooleanContext
impl Send for BooleanContext
impl Sync for BooleanContext
impl Unpin for BooleanContext
impl UnwindSafe for BooleanContext
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