Trait git_transport::client::ExtendedBufRead
source · [−]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>;
}Available on crate feature
blocking-client only.Expand description
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
read pack files while keeping open the option to read individual lines with low overhead.
Required Methods
sourcefn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
Set the handler to which progress will be delivered.
Note that this is only possible if packet lines are sent in side band mode.
Peek the next data packet line. Maybe None if the next line is a packet we stop at, queryable using
stopped_at().
Resets the reader to allow reading past a previous stop, and sets delimiters according to the given protocol.
sourcefn stopped_at(&self) -> Option<MessageKind>
fn stopped_at(&self) -> Option<MessageKind>
Return the kind of message at which the reader stopped.
Implementations on Foreign Types
sourceimpl<'a, T: ExtendedBufRead + ?Sized + 'a> ExtendedBufRead for Box<T>
impl<'a, T: ExtendedBufRead + ?Sized + 'a> ExtendedBufRead for Box<T>
sourcefn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
Available on crate feature
blocking-client only.sourcefn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>
fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>
Available on crate feature
blocking-client only.sourcefn stopped_at(&self) -> Option<MessageKind>
fn stopped_at(&self) -> Option<MessageKind>
Available on crate feature
blocking-client only.sourceimpl<'a, T: Read> ExtendedBufRead for WithSidebands<'a, T, HandleProgress>
impl<'a, T: Read> ExtendedBufRead for WithSidebands<'a, T, HandleProgress>
sourcefn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress>)
Available on crate feature
blocking-client only.sourcefn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>
fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>
Available on crate feature
blocking-client only.sourcefn stopped_at(&self) -> Option<MessageKind>
fn stopped_at(&self) -> Option<MessageKind>
Available on crate feature
blocking-client only.