cranelift::prelude::isa::x64::encoding

Trait ByteSink

pub trait ByteSink {
    // Required methods
    fn put1(&mut self, _: u8);
    fn put2(&mut self, _: u16);
    fn put4(&mut self, _: u32);
    fn put8(&mut self, _: u64);
}
Expand description

The encoding formats in this module all require a way of placing bytes into a buffer.

Required Methods§

fn put1(&mut self, _: u8)

Add 1 byte to the code section.

fn put2(&mut self, _: u16)

Add 2 bytes to the code section.

fn put4(&mut self, _: u32)

Add 4 bytes to the code section.

fn put8(&mut self, _: u64)

Add 8 bytes to the code section.

Implementations on Foreign Types§

§

impl ByteSink for Vec<u8>

Provide a convenient implementation for testing.

§

fn put1(&mut self, v: u8)

§

fn put2(&mut self, v: u16)

§

fn put4(&mut self, v: u32)

§

fn put8(&mut self, v: u64)

Implementors§

§

impl ByteSink for MachBuffer<MInst>