Struct buf_redux::policy::FlushExact [−][src]
pub struct FlushExact(pub usize);
Only ever flush exactly the given number of bytes, until the writer is empty.
Trait Implementations
impl Debug for FlushExact
[src]
impl Debug for FlushExact
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 FlushExact
[src]
impl Default for FlushExact
fn default() -> FlushExact
[src]
fn default() -> FlushExact
Returns the "default value" for a type. Read more
impl WriterPolicy for FlushExact
[src]
impl WriterPolicy for FlushExact
fn before_write(&mut self, buf: &mut Buffer, incoming: usize) -> FlushAmt
[src]
fn before_write(&mut self, buf: &mut Buffer, incoming: usize) -> FlushAmt
Flushes the buffer if there is not enough room to fit incoming
bytes,
but only when the buffer contains at least self.0
bytes.
Otherwise, calls Buffer::make_room()
fn after_write(&mut self, _buf: &Buffer) -> FlushAmt
[src]
fn after_write(&mut self, _buf: &Buffer) -> FlushAmt
Flushes the given amount if possible, nothing otherwise.
Auto Trait Implementations
impl Send for FlushExact
impl Send for FlushExact
impl Sync for FlushExact
impl Sync for FlushExact