pub fn new(writer: W, max: u64) -> Self {
		ThrottledWriter {
			writer: writer,
			max: max,
			allowed: max,
			last_check: Instant::now(),
		}
	}
/// Adds throttling to a writer.
/// The resulting writer will write at most `max` amount of bytes per second
Adds throttling to a writer.
The resulting writer will write at most `max` amount of bytes per second
Adds throttling to a writer . The resulting writer will write at most ` max ` amount of bytes per second
pub fn new(writer: W, max: u64) -> Self {
		ThrottledWriter {
			writer: writer,
			max: max,
			allowed: max,
			last_check: Instant::now(),
		}
	}
pub fn new ( writer : W , max : u64 ) -> Self { ThrottledWriter { writer : writer , max : max , allowed : max , last_check : Instant :: now ( ) , } }
Adds throttling to a writer.
Adds throttling to a writer .
writer
W
max
u64