Struct git_packetline::Writer [−][src]
pub struct Writer<T> { pub inner: T, // some fields omitted }
An implementor of Write
which passes all input to an inner Write
in packet line data encoding,
one line per write(…)
call or as many lines as it takes if the data doesn’t fit into the maximum allowed line length.
Fields
inner: T
the Write
implementation to which to propagate packet lines
Implementations
impl<T: Write> Writer<T>
[src]
impl<T: Write> Writer<T>
[src]pub fn enable_binary_mode(&mut self)
[src]
pub fn enable_binary_mode(&mut self)
[src]If called, each call to write()
will write bytes as is.
pub fn enable_text_mode(&mut self)
[src]
pub fn enable_text_mode(&mut self)
[src]If called, each call to write()
will write the input as text, appending a trailing newline
if needed before writing.
pub fn text_mode(self) -> Self
[src]
pub fn text_mode(self) -> Self
[src]As enable_text_mode()
, but suitable for chaining.
pub fn binary_mode(self) -> Self
[src]
pub fn binary_mode(self) -> Self
[src]As enable_binary_mode()
, but suitable for chaining.
Trait Implementations
impl<T: Write> Write for Writer<T>
[src]
impl<T: Write> Write for Writer<T>
[src]fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]Write a buffer into this writer, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>
[src]
fn flush(&mut self) -> Result<()>
[src]Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn is_write_vectored(&self) -> bool
[src]
fn is_write_vectored(&self) -> bool
[src]can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]Attempts to write an entire buffer into this writer. Read more
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
[src]write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Writer<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Writer<T> where
T: Send,
T: Send,
impl<T> Sync for Writer<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Writer<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Writer<T> where
T: UnwindSafe,
T: UnwindSafe,