Skip to main content

codec_from

Function codec_from 

Source
pub fn codec_from<T: CodecTarget>(
    ast: &Ast,
    root: Id<TypeNode>,
    key: LayoutKey,
    options: CodecOptions,
) -> Result<Vec<T::Decl>, EncodeError>
Expand description

The encoder for the types one root reaches, and no others.

What a probe or a topic’s translation unit wants: an encoder for a type the root cannot reach is a static function nothing calls, and a generated file that warns is one whose warnings stop being read. Under per_sample the root gets the public entry and every type it reaches gets a body.

§Errors

As codec.