Struct xdr_codec::record::XdrRecordWriter
[−]
[src]
pub struct XdrRecordWriter<W: Write> { // some fields omitted }
Write records into a bytestream.
Flushes the current buffer as end of record when destroyed.
Methods
impl<W: Write> XdrRecordWriter<W>
[src]
fn new(w: W) -> XdrRecordWriter<W>
Create a new XdrRecordWriter
wrapped around a Write
implementation, using a default buffer size (64k).
fn with_buffer(w: W, bufsz: usize) -> XdrRecordWriter<W>
Create an instance with a specific buffer size. Panics if the size is zero.
fn flush_eor(&mut self, eor: bool) -> Result<()>
Flush the current buffer. If eor
is true, the end of record
marker is set.
Trait Implementations
impl<W: Write> Drop for XdrRecordWriter<W>
[src]
impl<W: Write> Write for XdrRecordWriter<W>
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this object, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0
Writes a formatted string into this writer, returning any error encountered. Read more
fn by_ref(&mut self) -> &mut Self
1.0.0
Creates a "by reference" adaptor for this instance of Write
. Read more