Trait git_transport::client::ExtendedBufRead [−][src]
pub trait ExtendedBufRead: BufRead { fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>); fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>; fn reset(&mut self, version: Protocol); fn stopped_at(&self) -> Option<MessageKind>; }
This trait exists to get a version of a git_packetline::Provider
without type parameters.
For the sake of usability, it also implements std::io::BufRead
making it trivial to (eventually)
read pack files while keeping the possibility to read individual lines with low overhead.
Required methods
fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
[src]
Set the handler to which progress will be delivered.
Note that this is only possible if packet lines are sent in side band mode.
fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>
[src]
Peek the next data packet line.
fn reset(&mut self, version: Protocol)
[src]
Resets the reader to allow reading past a previous stop, and sets delimiters according to the given protocol.
fn stopped_at(&self) -> Option<MessageKind>
[src]
Return the kind of message at which the reader stopped.
Implementations on Foreign Types
impl<'a, T: ExtendedBufRead + ?Sized + 'a> ExtendedBufRead for Box<T>
[src]
impl<'a, T: ExtendedBufRead + ?Sized + 'a> ExtendedBufRead for Box<T>
[src]fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
[src]
fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>
[src]
fn reset(&mut self, version: Protocol)
[src]
fn stopped_at(&self) -> Option<MessageKind>
[src]
impl<'a, T: Read> ExtendedBufRead for ReadWithSidebands<'a, T, HandleProgress>
[src]
impl<'a, T: Read> ExtendedBufRead for ReadWithSidebands<'a, T, HandleProgress>
[src]