[][src]Struct body_image::Tuner

pub struct Tuner { /* fields omitted */ }

A builder for Tunables. Invariants are asserted in the various setters and finish.

Implementations

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 to RAM.

pub fn set_buffer_size_fs(&mut self, size: usize) -> &mut Tuner[src]

Set the buffer size in bytes to use when buffering to/from 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]

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]

impl Default for Tuner[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,