[−][src]Struct body_image::Tuner
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 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]
P: AsRef<Path>,
Set the path in which to write temporary files.
pub fn set_res_timeout(&mut self, dur: Duration) -> &mut Tuner
[src]
Set the maximum initial response timeout interval.
pub fn unset_res_timeout(&mut self) -> &mut Tuner
[src]
Unset (e.g. disable) response timeout
pub fn set_body_timeout(&mut self, dur: Duration) -> &mut Tuner
[src]
Set the maximum streaming body timeout interval.
pub fn unset_body_timeout(&mut self) -> &mut Tuner
[src]
Unset (e.g. disable) body timeout
pub fn finish(&self) -> Tunables
[src]
Finish building, asserting any remaining invariants, and return a new
Tunables
instance.
Trait Implementations
Auto Trait Implementations
impl Send for Tuner
impl Unpin for Tuner
impl Sync for Tuner
impl UnwindSafe for Tuner
impl RefUnwindSafe for Tuner
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,