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]
pub fn new() -> Tuner
[src]
New Tuner
with all Tunables
defaults.
pub fn set_max_body_ram(&mut self, size: u64) -> &mut Tuner
[src]
Set the maximum body size in bytes allowed in RAM.
pub fn set_max_body(&mut self, size: u64) -> &mut Tuner
[src]
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]
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]
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]
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]
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]
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]
P: AsRef<Path>,
Set the path in which to write temporary files.
pub fn finish(&self) -> Tunables
[src]
Finish building, asserting any remaining invariants, and return a new
Tunables
instance.
Trait Implementations
impl Clone for Tuner
[src]
fn clone(&self) -> Tuner
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more