pub trait ReadlineBufRead: BufRead {
    // Required method
    fn readline(&mut self) -> Option<Result<Result<PacketLineRef<'_>, Error>>>;
}
Available on crate feature blocking-client only.
Expand description

This trait exists to get a version of a git_packetline::Provider without type parameters, but leave support for reading lines directly without forcing them through String.

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§

source

fn readline(&mut self) -> Option<Result<Result<PacketLineRef<'_>, Error>>>

Read a packet line into the internal buffer and return it.

Returns None if the end of iteration is reached because of one of the following:

  • natural EOF
  • ERR packet line encountered
  • A delimiter packet line encountered

Implementations on Foreign Types§

source§

impl<T: Read> ReadlineBufRead for WithSidebands<'_, T, fn(_: bool, _: &[u8])>

source§

impl<'a, T: ReadlineBufRead + ?Sized + 'a> ReadlineBufRead for Box<T>

source§

impl<'a, T: Read> ReadlineBufRead for WithSidebands<'a, T, HandleProgress>

Implementors§