Struct body_image::Tuner [−][src]
pub struct Tuner { /* fields omitted */ }
A builder for Tunables
. Invariants are asserted in the various setters
and finish
.
Methods
impl Tuner
[src]
impl Tuner
pub fn new() -> Tuner
[src]
pub fn new() -> Tuner
New Tuner
with all Tunables
defaults.
pub fn set_max_body_ram(&mut self, size: u64) -> &mut Tuner
[src]
pub fn set_max_body_ram(&mut self, size: u64) -> &mut Tuner
Set the maximum body size in bytes allowed in RAM.
pub fn set_max_body(&mut self, size: u64) -> &mut Tuner
[src]
pub fn set_max_body(&mut self, size: u64) -> &mut Tuner
Set the maximum body size in bytes allowed in any form (RAM or
file). This must be at least as large as max_body_ram
, as asserted
on finish
.
pub fn set_buffer_size_ram(&mut self, size: usize) -> &mut Tuner
[src]
pub fn set_buffer_size_ram(&mut self, size: usize) -> &mut Tuner
Set the buffer size in bytes to use when buffering for output in RAM.
pub fn set_buffer_size_fs(&mut self, size: usize) -> &mut Tuner
[src]
pub fn set_buffer_size_fs(&mut self, size: usize) -> &mut Tuner
Set the buffer size in bytes to use when buffering for output to the file-system.
pub fn set_size_estimate_deflate(&mut self, multiple: u16) -> &mut Tuner
[src]
pub fn set_size_estimate_deflate(&mut self, multiple: u16) -> &mut Tuner
Set the size estimate, as an integer multiple of the encoded buffer size, for the deflate compression algorithm.
pub fn set_size_estimate_gzip(&mut self, multiple: u16) -> &mut Tuner
[src]
pub fn set_size_estimate_gzip(&mut self, multiple: u16) -> &mut Tuner
Set the size estimate, as an integer multiple of the encoded buffer size, for the gzip compression algorithm.
pub fn set_size_estimate_brotli(&mut self, multiple: u16) -> &mut Tuner
[src]
pub fn set_size_estimate_brotli(&mut self, multiple: u16) -> &mut Tuner
Set the size estimate, as an integer multiple of the encoded buffer size, for the Brotli compression algorithm.
pub fn set_temp_dir<P>(&mut self, path: P) -> &mut Tuner where
P: AsRef<Path>,
[src]
pub fn set_temp_dir<P>(&mut self, path: P) -> &mut Tuner where
P: AsRef<Path>,
Set the path in which to write temporary files.
pub fn set_res_timeout(&mut self, dur: Duration) -> &mut Tuner
[src]
pub fn set_res_timeout(&mut self, dur: Duration) -> &mut Tuner
Set the maximum initial response timeout interval.
pub fn set_body_timeout(&mut self, dur: Duration) -> &mut Tuner
[src]
pub fn set_body_timeout(&mut self, dur: Duration) -> &mut Tuner
Set the maximum streaming body timeout interval.
pub fn finish(&self) -> Tunables
[src]
pub fn finish(&self) -> Tunables
Finish building, asserting any remaining invariants, and return a new
Tunables
instance.
Trait Implementations
impl Clone for Tuner
[src]
impl Clone for Tuner
fn clone(&self) -> Tuner
[src]
fn clone(&self) -> Tuner
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for Tuner
[src]
impl Default for Tuner