Trait fuel_types::canonical::Output

source ·
pub trait Output {
    // Required method
    fn write(&mut self, bytes: &[u8]) -> Result<(), Error>;

    // Provided method
    fn push_byte(&mut self, byte: u8) -> Result<(), Error> { ... }
}
Expand description

Allows writing of data.

Required Methods§

source

fn write(&mut self, bytes: &[u8]) -> Result<(), Error>

Write bytes to the output buffer.

Provided Methods§

source

fn push_byte(&mut self, byte: u8) -> Result<(), Error>

Write a single byte to the output buffer.

Implementations on Foreign Types§

source§

impl Output for Vec<u8>

source§

fn write(&mut self, bytes: &[u8]) -> Result<(), Error>

source§

impl<'a> Output for &'a mut [u8]

source§

fn write(&mut self, from: &[u8]) -> Result<(), Error>

Implementors§