pub struct StructBindV1(pub Box<Bind>);Expand description
One declaration inside a module … = struct … end body.
Bind’s own alternatives are exactly what a struct
body may contain (bind*), so this simply re-parses a Bind — but
not by naming Bind as a field type directly: Bind lives
outside the #[recurse] module (below), so Bind -> ModExpr -> Vec<StructBindV1> -> Bind would be a self-recursive cycle through a
plain #[derive(Parse)], which (without the #[recurse] engine to back
it) is an E0275 hazard (an unbounded recursive trait-bound
obligation) — exactly crate::cst::StructDecl’s own rationale
(cst.rs:262-269). Hand-writing Parse/Unparse here — the same trick
as the erased_leaf_v1! macro below — sidesteps that: the impl has no
recursive where-bound for the compiler to try to satisfy, it just calls
Bind::parse through the stream-erasing adapter at runtime.
Tuple Fields§
§0: Box<Bind>Trait Implementations§
Source§impl Clone for StructBindV1
impl Clone for StructBindV1
Source§fn clone(&self) -> StructBindV1
fn clone(&self) -> StructBindV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StructBindV1
impl Debug for StructBindV1
Source§impl Parse<WithSpan<Token, Span>> for StructBindV1
impl Parse<WithSpan<Token, Span>> for StructBindV1
Source§type Error = ParseError<Span>
type Error = ParseError<Span>
<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.