Skip to main content

emit_default_json

Function emit_default_json 

Source
pub fn emit_default_json(spec: &MessageSpec) -> Result<String, EmitError>
Expand description

Emit the default_json(version: i16) function body for the given message. The output is plain Rust source, and the caller appends it to the per-message owned module body.

ยงErrors

Returns an error when the emitted function is not valid Rust, which is an emitter bug.