pub fn emit_parametric_instruction<O: Write + ?Sized>(
    instruction: &ParametricInstruction,
    output: &mut O,
) -> Result<usize, EmitError> {
    let mut bytes = 0;

    match instruction {
        ParametricInstruction::Drop => {
            bytes += emit_byte(0x1Au8, output)?;
        }
        ParametricInstruction::Select(Some(types)) => {
            bytes += emit_byte(0x1Cu8, output)?;
            bytes += emit_vector(types, output, emit_value_type)?;
        }
        ParametricInstruction::Select(None) => {
            bytes += emit_byte(0x1Bu8, output)?;
        }
    }

    Ok(bytes)
}
/// Emit a parametric instruction to the output.
///
/// See https://webassembly.github.io/spec/core/binary/instructions.html#parametric-instructions
Emit a parametric instruction to the output.
Emit a parametric instruction to the output .
pub fn emit_parametric_instruction<O: Write + ?Sized>(
    instruction: &ParametricInstruction,
    output: &mut O,
) -> Result<usize, EmitError> {
    let mut bytes = 0;
    match instruction {
        ParametricInstruction::Drop => {
            bytes += emit_byte(0x1Au8, output)?;
        }
        ParametricInstruction::Select(Some(types)) => {
            bytes += emit_byte(0x1Cu8, output)?;
            bytes += emit_vector(types, output, emit_value_type)?;
        }
        ParametricInstruction::Select(None) => {
            bytes += emit_byte(0x1Bu8, output)?;
        }
    }
    Ok(bytes)
}
pub fn emit_parametric_instruction < O : Write + ? Sized > ( instruction : & ParametricInstruction , output : & mut O , ) -> Result < usize , EmitError > { let mut bytes = 0 ; match instruction { ParametricInstruction :: Drop => { bytes += emit_byte ( 0x1Au8 , output ) ? ; } ParametricInstruction :: Select ( Some ( types ) ) => { bytes += emit_byte ( 0x1Cu8 , output ) ? ; bytes += emit_vector ( types , output , emit_value_type ) ? ; } ParametricInstruction :: Select ( None ) => { bytes += emit_byte ( 0x1Bu8 , output ) ? ; } } Ok ( bytes ) }
Emit a parametric instruction to the output.
Emit a parametric instruction to the output .
instruction
&ParametricInstruction
output
&mut O
instruction
&ParametricInstruction
output
&mut O