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>

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>

fn drop(&mut self)

impl<W: Write> Write for XdrRecordWriter<W>

fn write(&mut self, buf: &[u8]) -> Result<usize>

fn flush(&mut self) -> Result<()>

1.0.0fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

1.0.0fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>

1.0.0fn by_ref(&mut self) -> &mut Self

fn broadcast<W>(self, other: W) -> Broadcast<Self, W> where W: Write