pub enum MathArg {
Math {
mgrp: MathGroup<()>,
elems: Vec<MathErasedV1>,
},
Inline {
igrp: InlineGroup<()>,
elems: Vec<InlineElem>,
},
Block {
bgrp: BlockGroup<()>,
elems: Vec<BlockElem>,
},
ParenEscape {
paren: ParenGroup<()>,
inner: Box<ParenBody>,
},
ListEscape {
list: ListGroup<()>,
items: Vec<ListItem>,
},
RecordEscape {
rec: RecordGroup<()>,
body: RecordBody,
},
}Expand description
matharg-analogue: one command argument in math mode — identical
shape to crate::cst::ast::MathArg (no 0.1 delta; the escape
bodies reuse the now-comma-separated ParenBody/ListItem/
RecordBody defined above).
Variants§
Math
{ math }.
Inline
!{ inline text }.
Block
!<block text>.
ParenEscape
!(e) / !(e, e, …).
ListEscape
![e, …].
RecordEscape
!(|l = e, …|).
Trait Implementations§
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for MathArgwhere
__SyanMacro_Atom: Spanned + Clone,
MathGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_mgrp_MathArg_Math_746344495710489311: Parse<__SyanMacro_Atom>,
InlineGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_igrp_MathArg_Inline_746344495710489311: Parse<__SyanMacro_Atom>,
BlockGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_bgrp_MathArg_Block_746344495710489311: Parse<__SyanMacro_Atom>,
ParenGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_paren_MathArg_ParenEscape_746344495710489311: Parse<__SyanMacro_Atom>,
ListGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_list_MathArg_ListEscape_746344495710489311: Parse<__SyanMacro_Atom>,
RecordGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_rec_MathArg_RecordEscape_746344495710489311: Parse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for MathArgwhere
__SyanMacro_Atom: Spanned + Clone,
MathGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_mgrp_MathArg_Math_746344495710489311: Parse<__SyanMacro_Atom>,
InlineGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_igrp_MathArg_Inline_746344495710489311: Parse<__SyanMacro_Atom>,
BlockGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_bgrp_MathArg_Block_746344495710489311: Parse<__SyanMacro_Atom>,
ParenGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_paren_MathArg_ParenEscape_746344495710489311: Parse<__SyanMacro_Atom>,
ListGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_list_MathArg_ListEscape_746344495710489311: Parse<__SyanMacro_Atom>,
RecordGroup<()>: GroupShape<__SyanMacro_Atom>,
__SyanSubstructOfOwn_rec_MathArg_RecordEscape_746344495710489311: Parse<__SyanMacro_Atom>,
Source§type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
Every error must be convertible to the universal one, so a field’s failure can become the
enclosing type’s failure with no per-field where-predicate. Stating it HERE rather than at
each derived impl is what keeps it out of the obligation graph: a per-field
<FieldTy as Parse<Atom>>::Error: Into<…> predicate re-creates a projection cycle on a
recursive field (E0275), which decycle’s bound-peeling does not break.Source§fn parse_stream<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>(
__syan_stream: &mut __SyanMacro_S,
) -> Result<Self, Self::Error>
fn parse_stream<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>( __syan_stream: &mut __SyanMacro_S, ) -> Result<Self, Self::Error>
Parse from a reborrowable stream. Read more
impl StructuralPartialEq for MathArg
Source§impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for MathArgwhere
MathGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_mgrp_MathArg_Math_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
InlineGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_igrp_MathArg_Inline_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
BlockGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_bgrp_MathArg_Block_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
ParenGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_paren_MathArg_ParenEscape_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
ListGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_list_MathArg_ListEscape_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
RecordGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_rec_MathArg_RecordEscape_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for MathArgwhere
MathGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_mgrp_MathArg_Math_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
InlineGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_igrp_MathArg_Inline_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
BlockGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_bgrp_MathArg_Block_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
ParenGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_paren_MathArg_ParenEscape_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
ListGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_list_MathArg_ListEscape_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
RecordGroup<()>: GroupUnparse<__SyanMacro_Atom>,
for<'syan_substruct_ref> __SyanSubstructOfRef_rec_MathArg_RecordEscape_746344495710489311<'syan_substruct_ref>: Unparse<__SyanMacro_Atom>,
Auto Trait Implementations§
impl Freeze for MathArg
impl RefUnwindSafe for MathArg
impl Send for MathArg
impl Sync for MathArg
impl Unpin for MathArg
impl UnsafeUnpin for MathArg
impl UnwindSafe for MathArg
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