Mercurial > lbo > hg > localmr
view src/formats/fake.rs @ 74:fb6d8991bcc9
Add SinkGenerator implementation that yields buffers to write to
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sun, 07 Feb 2016 09:15:47 +0000 |
parents | |
children | 8d84dcb8f264 |
line wrap: on
line source
use std::collections::BTreeMap; use std::io::BufWriter; use std::vec; use record_types::*; use formats::util::MRSinkGenerator; pub struct BufWriterSinkGen { // bogus field so the struct isn't empty i: i32, } impl MRSinkGenerator for BufWriterSinkGen { type Sink = Vec<u8>; fn new_output(&mut self, name: &String) -> Self::Sink { Vec::new() } }