Struct box_stream::BoxWriter [] [src]

pub struct BoxWriter<W: Write> { /* fields omitted */ }

Wraps a writer, encrypting all writes.

Methods

impl<W: Write> BoxWriter<W>
[src]

Create a new writer, wrapping inner and using key and nonce for encryption.

Gets a reference to the underlying writer.

Gets a mutable reference to the underlying writer.

It is inadvisable to directly write to the underlying writer.

Unwraps this BoxWriter, returning the underlying writer.

Tries to write a final header, indicating the end of the connection. This will flush all internally buffered data before writing the header.

After this has returned Ok(()), no further methods of the BoxWriter may be called. If this returns an error, it may be safely called again. Only once this returns Ok(()) the final header is guaranteed to have been written.

Trait Implementations

impl<W: Write> Write for BoxWriter<W>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more

impl<AW: AsyncWrite> AsyncWrite for BoxWriter<AW>
[src]

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more

Write a Buf into this value, returning how many bytes were written. Read more