[][src]Struct git_packetline::Writer

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]

pub fn new(write: T) -> Self[src]

Create a new instance from the given write

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]

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]

As enable_text_mode(), but suitable for chaining.

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]

Auto Trait Implementations

impl<T> RefUnwindSafe for Writer<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for Writer<T> where
    T: Send
[src]

impl<T> Sync for Writer<T> where
    T: Sync
[src]

impl<T> Unpin for Writer<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Writer<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.