Source

Trait Source 

Source
pub trait Source: Send {
    // Required methods
    fn create(self, buffer: Vec<u8>) -> Vec<u8> ;
    fn header(&self, buffer: Vec<u8>) -> Vec<u8> ;
}
Expand description

Something that knows how to generate data into a buffer

For example, this is implemented for the different generators in the tpchgen crate

Required Methods§

Source

fn create(self, buffer: Vec<u8>) -> Vec<u8>

generates the data for this generator into the buffer, returning the buffer.

Source

fn header(&self, buffer: Vec<u8>) -> Vec<u8>

Create the first line for the output, into the buffer

This will be called before the first call to Self::create and exactly once across all Sourcees

Implementors§