/// Emits a slice of bytes to the output.
/// The bytes may optionally be treated as a vector.
/// Provides an optimization over using `emit_vector(value, output, emit_byte)` and `emit_repeated(value, output, emit_byte)`.
///
/// See https://webassembly.github.io/spec/core/binary/values.html#bytes
///
/// See https://webassembly.github.io/spec/core/binary/conventions.html#vectors
Emits a slice of bytes to the output.
The bytes may optionally be treated as a vector.




Emits a slice of bytes to the output . The bytes may optionally be treated as a vector .
pub fn emit_bytes<O: Write + ?Sized>(
    value: &[u8],
    output: &mut O,
    include_length: bool,
) -> Result<usize, EmitError> {
    let prefix = if include_length {
        emit_usize(value.len(), output)?
    } else {
        0
    };
    output.write_all(value)?;
    Ok(prefix + value.len())
}
pub fn emit_bytes < O : Write + ? Sized > ( value : & [ u8 ] , output : & mut O , include_length : bool , ) -> Result < usize , EmitError > { let prefix = if include_length { emit_usize ( value . len ( ) , output ) ? } else { 0 } ; output . write_all ( value ) ? ; Ok ( prefix + value . len ( ) ) }
Emits a slice of bytes to the output.
Emits a slice of bytes to the output .
value
&[u8]
output
&mut O
include_length
bool