Struct fastly::limits::RequestLimits
source · [−]pub struct RequestLimits { /* private fields */ }
Expand description
The limits for components of an HTTP request.
This is primarily relevant for the client request, and should be set before the client request
is read with a method like Request::from_client()
.
Since the fastly::main
attribute macro automatically reads the client request
before application code has a chance to run, you should not use the macro if you need to
customize the limits.
Default values
Limit | Default value |
---|---|
Header name size | DEFAULT_MAX_HEADER_NAME_BYTES |
Header value size | DEFAULT_MAX_HEADER_VALUE_BYTES |
Method size | DEFAULT_MAX_METHOD_BYTES |
URL size | DEFAULT_MAX_URL_BYTES |
Implementations
sourceimpl RequestLimits
impl RequestLimits
sourcepub fn set_all_default()
pub fn set_all_default()
Set all request limits to their default values.
sourcepub fn set_all_disabled()
pub fn set_all_disabled()
Disable all request limits.
Note that the overall WebAssembly heap size limit still applies.
sourcepub fn get_max_header_name_bytes() -> Option<usize>
pub fn get_max_header_name_bytes() -> Option<usize>
Get the current request header name size limit.
sourcepub fn set_max_header_name_bytes(max: Option<usize>)
pub fn set_max_header_name_bytes(max: Option<usize>)
Set the request header name size limit.
sourcepub fn get_max_header_value_bytes() -> Option<usize>
pub fn get_max_header_value_bytes() -> Option<usize>
Get the current request header value size limit.
sourcepub fn set_max_header_value_bytes(max: Option<usize>)
pub fn set_max_header_value_bytes(max: Option<usize>)
Set the request header value size limit.
sourcepub fn get_max_method_bytes() -> Option<usize>
pub fn get_max_method_bytes() -> Option<usize>
Get the current request method size limit.
sourcepub fn set_max_method_bytes(max: Option<usize>)
pub fn set_max_method_bytes(max: Option<usize>)
Set the request method size limit.
sourcepub fn get_max_url_bytes() -> Option<usize>
pub fn get_max_url_bytes() -> Option<usize>
Get the current request URL size limit.
sourcepub fn set_max_url_bytes(max: Option<usize>)
pub fn set_max_url_bytes(max: Option<usize>)
Set the request URL size limit.
Trait Implementations
sourceimpl Clone for RequestLimits
impl Clone for RequestLimits
sourcefn clone(&self) -> RequestLimits
fn clone(&self) -> RequestLimits
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RequestLimits
impl Debug for RequestLimits
impl Copy for RequestLimits
Auto Trait Implementations
impl RefUnwindSafe for RequestLimits
impl Send for RequestLimits
impl Sync for RequestLimits
impl Unpin for RequestLimits
impl UnwindSafe for RequestLimits
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more