pub fn codec<T: CodecTarget>(
ast: &Ast,
key: LayoutKey,
options: CodecOptions,
) -> Result<Vec<T::Decl>, EncodeError>Expand description
Build the encoder for every type in the model, under one plan.
Under per_sample the named non-@nested aggregates additionally
get a public entry that bakes their own sample decision in; every
other type is reached through the body of the type that declares it.
§Errors
EncodeError when the layout cannot be planned or a construct has
no C writer — never a body that leaves a member out.