Struct buf_redux::policy::FlushExact
source · pub struct FlushExact(pub usize);
Expand description
Only ever flush exactly the given number of bytes, until the writer is empty.
Tuple Fields
0: usize
Trait Implementations
sourceimpl Debug for FlushExact
impl Debug for FlushExact
sourceimpl Default for FlushExact
impl Default for FlushExact
sourcefn default() -> FlushExact
fn default() -> FlushExact
Returns the “default value” for a type. Read more
sourceimpl WriterPolicy for FlushExact
impl WriterPolicy for FlushExact
sourcefn before_write(&mut self, buf: &mut Buffer, incoming: usize) -> FlushAmt
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()
sourcefn after_write(&mut self, _buf: &Buffer) -> FlushAmt
fn after_write(&mut self, _buf: &Buffer) -> FlushAmt
Flushes the given amount if possible, nothing otherwise.
Auto Trait Implementations
impl RefUnwindSafe for FlushExact
impl Send for FlushExact
impl Sync for FlushExact
impl Unpin for FlushExact
impl UnwindSafe for FlushExact
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more