WritableBuffer

Trait WritableBuffer 

Source
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§