cranelift_codegen::isa::x64::encoding

Trait ByteSink

Source
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);
}
Available on crate feature x86 only.
Expand description

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

Required Methods§

Source

fn put1(&mut self, _: u8)

Add 1 byte to the code section.

Source

fn put2(&mut self, _: u16)

Add 2 bytes to the code section.

Source

fn put4(&mut self, _: u32)

Add 4 bytes to the code section.

Source

fn put8(&mut self, _: u64)

Add 8 bytes to the code section.

Implementations on Foreign Types§

Source§

impl ByteSink for Vec<u8>

Provide a convenient implementation for testing.

Source§

fn put1(&mut self, v: u8)

Source§

fn put2(&mut self, v: u16)

Source§

fn put4(&mut self, v: u32)

Source§

fn put8(&mut self, v: u64)

Implementors§