pub trait WritableBuffer {
    // Required methods
    fn allocate_more(&mut self, amount: usize);
    fn write(&mut self, val: u8);
    fn write_bytes(&mut self, val: &[u8]);
}
Expand description

Allows a type to allow a Kerbal Machine Code or Kerbal Object file to be written into it

Required Methods§

source

fn allocate_more(&mut self, amount: usize)

Notifies this buffer that if it can, it should resize by the additional amount specified

source

fn write(&mut self, val: u8)

Writes a single byte to this buffer

source

fn write_bytes(&mut self, val: &[u8])

Writes a byte slice to this buffer

Implementations on Foreign Types§

source§

impl WritableBuffer for Vec<u8>

source§

fn allocate_more(&mut self, amount: usize)

source§

fn write(&mut self, val: u8)

source§

fn write_bytes(&mut self, val: &[u8])

Implementors§