[−][src]Struct git_packetline::provider::Provider
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]
T: Read,
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]
&mut self,
position: usize,
replace_with: u8
)
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]
&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]),
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]
&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]),
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]
Notable traits for ReadWithSidebands<'a, T, F>
impl<'a, T, F> Read for ReadWithSidebands<'a, T, F> where
T: Read,
F: FnMut(bool, &[u8]),
Auto Trait Implementations
impl<T> RefUnwindSafe for Provider<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Provider<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Provider<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Provider<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Provider<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,