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§
Source§impl Debug for FlushExact
impl Debug for FlushExact
Source§impl Default for FlushExact
impl Default for FlushExact
Source§fn default() -> FlushExact
fn default() -> FlushExact
Returns the “default value” for a type. Read more
Source§impl WriterPolicy for FlushExact
impl WriterPolicy for FlushExact
Source§fn 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()
Source§fn 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 Freeze for FlushExact
impl RefUnwindSafe for FlushExact
impl Send for FlushExact
impl Sync for FlushExact
impl Unpin for FlushExact
impl UnwindSafe for FlushExact
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more