rustc_builtin_macros::deriving::decodable

Function decode_static_fields

source
fn decode_static_fields<F>(
    cx: &ExtCtxt<'_>,
    trait_span: Span,
    outer_pat_path: Path,
    fields: &StaticFields,
    getarg: F,
) -> P<Expr>
where F: FnMut(&ExtCtxt<'_>, Span, Symbol, usize) -> P<Expr>,
Expand description

Creates a decoder for a single enum variant/struct:

  • outer_pat_path is the path to this enum variant/struct
  • getarg should retrieve the usize-th field with name @str.