Struct buffer_redux::policy::StdPolicy
source · 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.