Trait cranelift_codegen::isa::x64::encoding::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);
}
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§