Struct buf_redux::policy::FlushOn [−][src]
pub struct FlushOn(pub u8);
Flush the buffer if it contains the given byte.
Only scans the buffer after reading. Searches from the end first.
Trait Implementations
impl Debug for FlushOn
[src]
impl Debug for FlushOn
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for FlushOn
[src]
impl Default for FlushOn
impl WriterPolicy for FlushOn
[src]
impl WriterPolicy for FlushOn
fn after_write(&mut self, buf: &Buffer) -> FlushAmt
[src]
fn after_write(&mut self, buf: &Buffer) -> FlushAmt
Return true
if the buffer should be flushed after reading into it. Read more
fn before_write(&mut self, buf: &mut Buffer, incoming: usize) -> FlushAmt
[src]
fn before_write(&mut self, buf: &mut Buffer, incoming: usize) -> FlushAmt
Return FlushAmt(n > 0)
if the buffer should be flushed before reading into it. If the returned amount is 0 or greater than the amount of buffered data, no flush is performed. Read more