pub trait ExtendedBufRead<'a>: ReadlineBufRead {
    // Required methods
    fn set_progress_handler(
        &mut self,
        handle_progress: Option<HandleProgress<'a>>
    );
    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

Provide even more access to the underlying packet reader.

Required Methods§

source

fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress<'a>>)

Set the handler to which progress will be delivered.

Note that this is only possible if packet lines are sent in side band mode.

source

fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>

Peek the next data packet line. Maybe None if the next line is a packet we stop at, queryable using stopped_at().

source

fn reset(&mut self, version: Protocol)

Resets the reader to allow reading past a previous stop, and sets delimiters according to the given protocol.

source

fn stopped_at(&self) -> Option<MessageKind>

Return the kind of message at which the reader stopped.

Implementations on Foreign Types§

source§

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

source§

fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress<'a>>)

source§

fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>

source§

fn reset(&mut self, version: Protocol)

source§

fn stopped_at(&self) -> Option<MessageKind>

source§

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

source§

fn set_progress_handler(&mut self, handle_progress: Option<HandleProgress<'a>>)

source§

fn peek_data_line(&mut self) -> Option<Result<Result<&[u8], Error>>>

source§

fn reset(&mut self, version: Protocol)

source§

fn stopped_at(&self) -> Option<MessageKind>

Implementors§