pub trait BufferedRawReader: RawReader + From<Vec<u8>> {
// Required methods
fn append_bytes(&mut self, bytes: &[u8]) -> IonResult<()>;
fn read_from<R: Read>(
&mut self,
source: R,
length: usize,
) -> IonResult<usize>;
fn stream_complete(&mut self);
fn is_stream_complete(&self) -> bool;
}
Expand description
BufferedRawReader is a RawReader which can be created from a Vec<u8>
and implements the needed
functionality to provide non-blocking reader support. This includes the ability to add more
data as needed, as well as marking when the stream is complete.
Required Methods§
fn append_bytes(&mut self, bytes: &[u8]) -> IonResult<()>
fn read_from<R: Read>(&mut self, source: R, length: usize) -> IonResult<usize>
fn stream_complete(&mut self)
fn is_stream_complete(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.