[][src]Struct git_packetline::provider::Provider

pub struct Provider<T> { /* fields omitted */ }

Read pack lines one after another, without consuming more than needed from the underlying Read. Flush lines cause the reader to stop producing lines forever, leaving Read at the start of whatever comes next.

Implementations

impl<T> Provider<T> where
    T: Read
[src]

pub fn new(inner: T, delimiters: &'static [PacketLine<'static>]) -> Self[src]

pub fn stopped_at(&self) -> Option<PacketLine<'static>>[src]

Returns None if the end wasn't reached yet, on EOF, or if fail_on_err_lines was true. Otherwise it returns the packet line that stopped the iteration.

pub fn replace(&mut self, read: T) -> T[src]

pub fn reset(&mut self)[src]

pub fn reset_with(&mut self, delimiters: &'static [PacketLine<'static>])[src]

pub fn fail_on_err_lines(&mut self, value: bool)[src]

pub fn read_line(&mut self) -> Option<Result<Result<PacketLine<'_>, Error>>>[src]

pub fn peek_buffer_replace_and_truncate(
    &mut self,
    position: usize,
    replace_with: u8
)
[src]

position does not include the 4 bytes prefix (they are invisible outside the reader)

pub fn peek_line(&mut self) -> Option<Result<Result<PacketLine<'_>, Error>>>[src]

pub fn as_read_with_sidebands<F: FnMut(bool, &[u8])>(
    &mut self,
    handle_progress: F
) -> ReadWithSidebands<'_, T, F>

Notable traits for ReadWithSidebands<'a, T, F>

impl<'a, T, F> Read for ReadWithSidebands<'a, T, F> where
    T: Read,
    F: FnMut(bool, &[u8]), 
[src]

pub fn as_read_without_sidebands<F: FnMut(bool, &[u8])>(
    &mut self
) -> ReadWithSidebands<'_, T, F>

Notable traits for ReadWithSidebands<'a, T, F>

impl<'a, T, F> Read for ReadWithSidebands<'a, T, F> where
    T: Read,
    F: FnMut(bool, &[u8]), 
[src]

pub fn as_read(&mut self) -> ReadWithSidebands<'_, T, fn(_: bool, _: &[u8])>

Notable traits for ReadWithSidebands<'a, T, F>

impl<'a, T, F> Read for ReadWithSidebands<'a, T, F> where
    T: Read,
    F: FnMut(bool, &[u8]), 
[src]

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for Provider<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.