Trait buf_redux::strategy::MoveStrategy [] [src]

pub trait MoveStrategy: Default + Debug {
    fn should_move(&self, buffer: &Buffer) -> bool;
}

Trait for types which BufReader can consult to determine when it should move data to the beginning of the buffer.

Note: If the buffer is empty, the next read will start at the beginning of the buffer regardless of the provided strategy.

Required Methods

Returns true if the buffer should move the data down to the beginning, false otherwise.

Implementors