Struct body_image::Tuner
source · pub struct Tuner { /* private fields */ }
Expand description
A builder for Tunables
. Invariants are asserted in the various setters
and finish
.
Implementations§
source§impl Tuner
impl Tuner
sourcepub fn set_max_body_ram(&mut self, size: u64) -> &mut Tuner
pub fn set_max_body_ram(&mut self, size: u64) -> &mut Tuner
Set the maximum body size in bytes allowed in RAM.
sourcepub fn set_max_body(&mut self, size: u64) -> &mut Tuner
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
.
sourcepub fn set_buffer_size_ram(&mut self, size: usize) -> &mut Tuner
pub fn set_buffer_size_ram(&mut self, size: usize) -> &mut Tuner
Set the buffer size in bytes to use when buffering to RAM.
sourcepub fn set_buffer_size_fs(&mut self, size: usize) -> &mut Tuner
pub fn set_buffer_size_fs(&mut self, size: usize) -> &mut Tuner
Set the buffer size in bytes to use when buffering to/from the file-system.
sourcepub fn set_size_estimate_deflate(&mut self, multiple: u16) -> &mut Tuner
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.
sourcepub fn set_size_estimate_gzip(&mut self, multiple: u16) -> &mut Tuner
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.
sourcepub fn set_size_estimate_brotli(&mut self, multiple: u16) -> &mut Tuner
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.
sourcepub fn set_temp_dir<P>(&mut self, path: P) -> &mut Tunerwhere
P: AsRef<Path>,
pub fn set_temp_dir<P>(&mut self, path: P) -> &mut Tunerwhere
P: AsRef<Path>,
Set the path in which to write temporary files.
sourcepub fn set_res_timeout(&mut self, dur: Duration) -> &mut Tuner
pub fn set_res_timeout(&mut self, dur: Duration) -> &mut Tuner
Set the maximum initial response timeout interval.
sourcepub fn unset_res_timeout(&mut self) -> &mut Tuner
pub fn unset_res_timeout(&mut self) -> &mut Tuner
Unset (e.g. disable) response timeout
sourcepub fn set_body_timeout(&mut self, dur: Duration) -> &mut Tuner
pub fn set_body_timeout(&mut self, dur: Duration) -> &mut Tuner
Set the maximum streaming body timeout interval.
sourcepub fn unset_body_timeout(&mut self) -> &mut Tuner
pub fn unset_body_timeout(&mut self) -> &mut Tuner
Unset (e.g. disable) body timeout