Struct cdg::SubchannelStreamIter [] [src]

pub struct SubchannelStreamIter<R: Read> { /* fields omitted */ }

A streaming iterator over the sectors read in from a reader. The interface is the same as Iterator, but the trait isn't implemented because Rust doesn't have higher-kinded types yet.

Examples

let file = std::fs::File::open("/dev/null").unwrap();
let mut sector_iterator = cdg::SubchannelStreamIter::new(file);
while let Some(sector) = sector_iterator.next() {
    for cmd in sector {
        // Do something with command
        println!("{:?}", cmd);
    }
}

Methods

impl<R: Read> SubchannelStreamIter<R>
[src]

Create a new subchannel stream iterator from a Reader

Fetch the next sector from the input file. Returns None at EOF