Struct box_stream::BoxWriter
[−]
[src]
pub struct BoxWriter<W> { /* fields omitted */ }
Wraps a writer, encrypting all writes.
Methods
impl<W> BoxWriter<W>
[src]
pub fn new(inner: W, key: Key, nonce: Nonce) -> BoxWriter<W>
[src]
Create a new writer, wrapping inner
and using key
and nonce
for
encryption.
pub fn get_ref(&self) -> &W
[src]
Gets a reference to the underlying writer.
pub fn get_mut(&mut self) -> &mut W
[src]
Gets a mutable reference to the underlying writer.
It is inadvisable to directly write to the underlying writer.
pub fn into_inner(self) -> W
[src]
Unwraps this BoxWriter
, returning the underlying writer.
Trait Implementations
impl<W: AsyncWrite> AsyncWrite for BoxWriter<W>
[src]
fn poll_write(&mut self, cx: &mut Context, buf: &[u8]) -> Poll<usize, Error>
[src]
Attempt to write bytes from buf
into the object. Read more
fn poll_flush(&mut self, cx: &mut Context) -> Poll<(), Error>
[src]
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
fn poll_close(&mut self, cx: &mut Context) -> Poll<(), Error>
[src]
Attempt to close the object. Read more
fn poll_vectored_write(
&mut self,
cx: &mut Context,
vec: &[&IoVec]
) -> Result<Async<usize>, Error>
[src]
&mut self,
cx: &mut Context,
vec: &[&IoVec]
) -> Result<Async<usize>, Error>
Attempt to write bytes from vec
into the object using vectored IO operations. Read more