[−][src]Struct git_packetline::provider::ReadWithSidebands
Note: Reading from this intermediary copies bytes 3 times: OS -> (parent) line provider buffer -> our buffer -> caller's output buffer
Implementations
impl<'a, T> ReadWithSidebands<'a, T, fn(_: bool, _: &[u8])> where
T: Read,
[src]
T: Read,
impl<'a, T, F> ReadWithSidebands<'a, T, F> where
T: Read,
F: FnMut(bool, &[u8]),
[src]
T: Read,
F: FnMut(bool, &[u8]),
pub fn with_progress_handler(
parent: &'a mut Provider<T>,
handle_progress: F
) -> Self
[src]
parent: &'a mut Provider<T>,
handle_progress: F
) -> Self
pub fn without_progress_handler(parent: &'a mut Provider<T>) -> Self
[src]
pub fn reset_with(&mut self, delimiters: &'static [PacketLine<'static>])
[src]
pub fn stopped_at(&self) -> Option<PacketLine<'static>>
[src]
pub fn set_progress_handler(&mut self, handle_progress: Option<F>)
[src]
pub fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>
[src]
Trait Implementations
impl<'a, T, F> BufRead for ReadWithSidebands<'a, T, F> where
T: Read,
F: FnMut(bool, &[u8]),
[src]
T: Read,
F: FnMut(bool, &[u8]),
pub fn fill_buf(&mut self) -> Result<&[u8]>
[src]
pub fn consume(&mut self, amt: usize)
[src]
pub fn read_line(&mut self, buf: &mut String) -> Result<usize>
[src]
pub fn read_until(
&mut self,
byte: u8,
buf: &mut Vec<u8, Global>
) -> Result<usize, Error>
1.0.0[src]
&mut self,
byte: u8,
buf: &mut Vec<u8, Global>
) -> Result<usize, Error>
pub fn split(self, byte: u8) -> Split<Self>
1.0.0[src]
pub fn lines(self) -> Lines<Self>
1.0.0[src]
impl<'a, T, F> Drop for ReadWithSidebands<'a, T, F> where
T: Read,
[src]
T: Read,
impl<'a, T, F> Read for ReadWithSidebands<'a, T, F> where
T: Read,
F: FnMut(bool, &[u8]),
[src]
T: Read,
F: FnMut(bool, &[u8]),
pub fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
pub fn read_vectored(
&mut self,
bufs: &mut [IoSliceMut<'_>]
) -> Result<usize, Error>
1.36.0[src]
&mut self,
bufs: &mut [IoSliceMut<'_>]
) -> Result<usize, Error>
pub fn is_read_vectored(&self) -> bool
[src]
pub unsafe fn initializer(&self) -> Initializer
[src]
pub fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>
1.0.0[src]
pub fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
pub fn by_ref(&mut self) -> &mut Self
1.0.0[src]
pub fn bytes(self) -> Bytes<Self>
1.0.0[src]
pub fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
pub fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
Auto Trait Implementations
impl<'a, T, F> RefUnwindSafe for ReadWithSidebands<'a, T, F> where
F: RefUnwindSafe,
T: RefUnwindSafe,
[src]
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, F> Send for ReadWithSidebands<'a, T, F> where
F: Send,
T: Send,
[src]
F: Send,
T: Send,
impl<'a, T, F> Sync for ReadWithSidebands<'a, T, F> where
F: Sync,
T: Sync,
[src]
F: Sync,
T: Sync,
impl<'a, T, F> Unpin for ReadWithSidebands<'a, T, F> where
F: Unpin,
[src]
F: Unpin,
impl<'a, T, F> !UnwindSafe for ReadWithSidebands<'a, T, F>
[src]
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<B> BufReadExt for B where
B: BufRead,
[src]
B: BufRead,
pub fn byte_lines(self) -> ByteLines<Self>
[src]
pub fn byte_records(self, terminator: u8) -> ByteRecords<Self>
[src]
pub fn for_byte_line<F>(self, for_each_line: F) -> Result<(), Error> where
F: FnMut(&[u8]) -> Result<bool, Error>,
[src]
F: FnMut(&[u8]) -> Result<bool, Error>,
pub fn for_byte_record<F>(
self,
terminator: u8,
for_each_record: F
) -> Result<(), Error> where
F: FnMut(&[u8]) -> Result<bool, Error>,
[src]
self,
terminator: u8,
for_each_record: F
) -> Result<(), Error> where
F: FnMut(&[u8]) -> Result<bool, Error>,
pub fn for_byte_line_with_terminator<F>(
self,
for_each_line: F
) -> Result<(), Error> where
F: FnMut(&[u8]) -> Result<bool, Error>,
[src]
self,
for_each_line: F
) -> Result<(), Error> where
F: FnMut(&[u8]) -> Result<bool, Error>,
pub fn for_byte_record_with_terminator<F>(
self,
terminator: u8,
for_each_record: F
) -> Result<(), Error> where
F: FnMut(&[u8]) -> Result<bool, Error>,
[src]
self,
terminator: u8,
for_each_record: F
) -> Result<(), Error> where
F: FnMut(&[u8]) -> Result<bool, Error>,
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>,