[−][src]Struct body_image::Tunables
A collection of size limits and performance tuning constants. Setters are
available via Tuner
.
Implementations
impl Tunables
[src]
pub fn new() -> Tunables
[src]
Construct with default values.
pub fn max_body_ram(&self) -> u64
[src]
Return the maximum body size in bytes allowed in RAM, e.g. before writing to a temporary file, or memory mapping instead of direct, bulk read. Default: 192 KiB.
pub fn max_body(&self) -> u64
[src]
Return the maximum body size in bytes allowed in any form (RAM or file). Default: 1 GiB.
pub fn buffer_size_ram(&self) -> usize
[src]
Return the buffer size in bytes to use when buffering to RAM. Default: 8 KiB.
pub fn buffer_size_fs(&self) -> usize
[src]
Return the buffer size in bytes to use when buffering to/from the file-system. Default: 64 KiB.
pub fn size_estimate_deflate(&self) -> u16
[src]
Return the size estimate, as an integer multiple of the encoded buffer size, for the deflate compression algorithm. Default: 4.
pub fn size_estimate_gzip(&self) -> u16
[src]
Return the size estimate, as an integer multiple of the encoded buffer size, for the gzip compression algorithm. Default: 5.
pub fn size_estimate_brotli(&self) -> u16
[src]
Return the size estimate, as an integer multiple of the encoded buffer size, for the Brotli compression algorithm. Default: 6.
pub fn temp_dir(&self) -> &Path
[src]
Return the directory path in which to write temporary (BodyImage
)
files. Default: std::env::temp_dir()
pub fn temp_dir_rc(&self) -> Arc<Path>
[src]
Return a reference to the directory path in which to write temporary
(BodyImage
) files. Default: std::env::temp_dir()
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Tunables
[src]
impl Send for Tunables
[src]
impl Sync for Tunables
[src]
impl Unpin for Tunables
[src]
impl UnwindSafe for Tunables
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,