pub struct ResponseLimits { /* private fields */ }
Expand description

The limits for components of an HTTP request.

This is primarily relevant for backend responses, and should be set before sending any backend requests.

Default values

LimitDefault value
Header name sizeDEFAULT_MAX_HEADER_NAME_BYTES
Header value sizeDEFAULT_MAX_HEADER_VALUE_BYTES

Implementations§

source§

impl ResponseLimits

source

pub fn set_all_default()

Set all response limits to their default values.

source

pub fn set_all_disabled()

Disable all response limits.

Note that the overall WebAssembly heap size limit still applies.

source

pub fn get_max_header_name_bytes() -> Option<usize>

Get the current response header name size limit.

source

pub fn set_max_header_name_bytes(max: Option<usize>)

Set the response header name size limit.

source

pub fn get_max_header_value_bytes() -> Option<usize>

Get the current response header value size limit.

source

pub fn set_max_header_value_bytes(max: Option<usize>)

Set the response header value size limit.

Trait Implementations§

source§

impl Clone for ResponseLimits

source§

fn clone(&self) -> ResponseLimits

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ResponseLimits

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for ResponseLimits

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.