pub struct StdPolicy;
Expand description
Default policy for both BufReader
and BufWriter
that reproduces the behaviors of their
std::io
counterparts:
BufReader
: only reads when the buffer is empty, does not resize or move data.BufWriter
: only flushes the buffer when there is not enough room for an incoming write.
Trait Implementations§
Source§impl ReaderPolicy for StdPolicy
impl ReaderPolicy for StdPolicy
Behavior of std::io::BufReader
: the buffer will only be read into if it is empty.
Source§impl WriterPolicy for StdPolicy
impl WriterPolicy for StdPolicy
Default behavior of std::io::BufWriter
: flush before a read into the buffer
only if the incoming data is larger than the buffer’s writable space.
Auto Trait Implementations§
impl Freeze for StdPolicy
impl RefUnwindSafe for StdPolicy
impl Send for StdPolicy
impl Sync for StdPolicy
impl Unpin for StdPolicy
impl UnwindSafe for StdPolicy
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