Struct pgp::line_writer::LineWriter [−][src]
pub struct LineWriter<'a, W, N> where
W: Write,
N: Unsigned + ArrayLength<u8>,
N: Add<U2>,
Sum<N, U2>: ArrayLength<u8>, { /* fields omitted */ }
Expand description
A Write
implementation that splits any written bytes into the given length lines.
Panics
Calling write()
after finish()
is invalid and will panic.
Implementations
impl<'a, W, N> LineWriter<'a, W, N> where
W: 'a + Write,
N: Unsigned + ArrayLength<u8>,
N: Add<U2>,
Sum<N, U2>: ArrayLength<u8>,
impl<'a, W, N> LineWriter<'a, W, N> where
W: 'a + Write,
N: Unsigned + ArrayLength<u8>,
N: Add<U2>,
Sum<N, U2>: ArrayLength<u8>,
Creates a new encoder around an existing writer.
Write all remaining buffered data.
Once this succeeds, no further writes can be performed.
Errors
Assuming the wrapped writer obeys the Write
contract, if this returns Err
, no data was
written, and finish()
may be retried if appropriate for the type of error, etc.
Trait Implementations
impl<'a, W, N> Drop for LineWriter<'a, W, N> where
W: 'a + Write,
N: Unsigned + ArrayLength<u8>,
N: Add<U2>,
Sum<N, U2>: ArrayLength<u8>,
impl<'a, W, N> Drop for LineWriter<'a, W, N> where
W: 'a + Write,
N: Unsigned + ArrayLength<u8>,
N: Add<U2>,
Sum<N, U2>: ArrayLength<u8>,
impl<'a, W, N> Write for LineWriter<'a, W, N> where
W: 'a + Write,
N: Unsigned + ArrayLength<u8>,
N: Add<U2>,
Sum<N, U2>: ArrayLength<u8>,
impl<'a, W, N> Write for LineWriter<'a, W, N> where
W: 'a + Write,
N: Unsigned + ArrayLength<u8>,
N: Add<U2>,
Sum<N, U2>: ArrayLength<u8>,
Because this is usually treated as OK to call multiple times, it will not flush any incomplete chunks of input or write padding.
Write a buffer into this writer, returning how many bytes were written. Read more
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
Attempts to write an entire buffer into this writer. Read more
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Auto Trait Implementations
impl<'a, W, N> RefUnwindSafe for LineWriter<'a, W, N> where
W: RefUnwindSafe,
<N as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<<N as Add<UInt<UInt<UTerm, B1>, B0>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<'a, W, N> Send for LineWriter<'a, W, N> where
W: Send,
impl<'a, W, N> Sync for LineWriter<'a, W, N> where
W: Sync,
impl<'a, W, N> Unpin for LineWriter<'a, W, N> where
<N as ArrayLength<u8>>::ArrayType: Unpin,
<<N as Add<UInt<UInt<UTerm, B1>, B0>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
impl<'a, W, N> !UnwindSafe for LineWriter<'a, W, N>
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Writes an unsigned 8 bit integer to the underlying writer. Read more
Writes a signed 8 bit integer to the underlying writer. Read more
Writes an unsigned 16 bit integer to the underlying writer. Read more
Writes a signed 16 bit integer to the underlying writer. Read more
Writes an unsigned 24 bit integer to the underlying writer. Read more
Writes a signed 24 bit integer to the underlying writer. Read more
Writes an unsigned 32 bit integer to the underlying writer. Read more
Writes a signed 32 bit integer to the underlying writer. Read more
Writes an unsigned 48 bit integer to the underlying writer. Read more
Writes a signed 48 bit integer to the underlying writer. Read more
Writes an unsigned 64 bit integer to the underlying writer. Read more
Writes a signed 64 bit integer to the underlying writer. Read more
Writes an unsigned 128 bit integer to the underlying writer.
Writes a signed 128 bit integer to the underlying writer.
Writes an unsigned n-bytes integer to the underlying writer. Read more
Writes a signed n-bytes integer to the underlying writer. Read more
Writes an unsigned n-bytes integer to the underlying writer. Read more
Writes a signed n-bytes integer to the underlying writer. Read more
Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more