[][src]Trait floaout::io::read::ReadBlock

pub trait ReadBlock<T, B>: Read {
    fn read_block(&mut self, _: T) -> Result<B>;
}

This trait reads block.

Required methods

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

This method reads format block.

Examples

use std::io;
use std::fs::File;
use floaout::format::wav::{Wav, WavBlock};
use floaout::io::read::ReadBlock;
 
fn main() -> io::Result<()> {
    let mut reader = io::BufReader::new(File::open("foo.wav")?);
    let wav = Wav::default();
 
    // read Wav block
    let wav_block: WavBlock = reader.read_block(&wav)?;
 
    Ok(())
}
Loading content...

Implementors

impl<'_, R: Read + ?Sized> ReadBlock<&'_ Bubble, BubbleBlock> for R[src]

impl<'_, R: Read + ?Sized> ReadBlock<&'_ Floaout, FloaoutBlock> for R[src]

impl<'_, R: Read + ?Sized> ReadBlock<&'_ Wav, WavBlock> for R[src]

Loading content...