[][src]Trait floaout::io::write::WriteBlock

pub trait WriteBlock<T, B>: Write {
    fn write_block(&mut self, _: T, _: B) -> Result<()>;
}

This trait writes block.

Required methods

fn write_block(&mut self, _: T, _: B) -> Result<()>

This method writes format block.

Examples

use std::io;
use std::fs::File;
use floaout::format::wav::Wav;
use floaout::io::write::WriteBlock;
 
fn main() -> io::Result<()> {
    let mut writer = io::BufWriter::new(File::create("foo.wav")?);
    let wav = Wav::default();
 
    // write Wav block
    writer.write_block(&wav, 1.0f32.into())?;
 
    Ok(())
}
Loading content...

Implementors

impl<'_, '_, W: Write + ?Sized> WriteBlock<&'_ Bubble, &'_ BubbleBlock> for W[src]

impl<'_, '_, W: Write + ?Sized> WriteBlock<&'_ Floaout, &'_ FloaoutBlock> for W[src]

impl<'_, W: Write + ?Sized> WriteBlock<&'_ Wav, WavBlock> for W[src]

Loading content...