Trait flac::StreamProducer
[−]
[src]
pub trait StreamProducer { fn parse<F, T>(&mut self, f: F) -> Result<T, ErrorKind>
where
F: FnOnce(&[u8]) -> IResult<&[u8], T, ErrorKind>; }
An interface for parsing through some type of producer to a byte stream.
External parsers get passed in and consumes the bytes held internally
and outputs the Result
of that parser.
Required Methods
fn parse<F, T>(&mut self, f: F) -> Result<T, ErrorKind> where
F: FnOnce(&[u8]) -> IResult<&[u8], T, ErrorKind>,
F: FnOnce(&[u8]) -> IResult<&[u8], T, ErrorKind>,
Implementors
impl<'a> StreamProducer for ByteStream<'a>
impl<R> StreamProducer for ReadStream<R> where
R: Read,