Struct kvarn::prelude::networking::prelude::utils::parse::CriticalRequestComponents
source · pub struct CriticalRequestComponents { /* private fields */ }
Expand description
Critical components from request to apply to response.
Implementations§
source§impl CriticalRequestComponents
impl CriticalRequestComponents
sourcepub fn apply_to_response(
&self,
response: &mut Response<Bytes>,
overriden_len: Option<usize>
) -> Result<(), SanitizeError>
pub fn apply_to_response( &self, response: &mut Response<Bytes>, overriden_len: Option<usize> ) -> Result<(), SanitizeError>
Applies the critical components’ info to the response
.
For now applies range and replaces the accept-ranges
header.
Errors
Will return a SanitizeError::RangeNotSatisfiable
if the start of the range is greater
than the length of the body.
Trait Implementations§
source§impl Debug for CriticalRequestComponents
impl Debug for CriticalRequestComponents
source§impl PartialEq<CriticalRequestComponents> for CriticalRequestComponents
impl PartialEq<CriticalRequestComponents> for CriticalRequestComponents
source§fn eq(&self, other: &CriticalRequestComponents) -> bool
fn eq(&self, other: &CriticalRequestComponents) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CriticalRequestComponents
impl StructuralEq for CriticalRequestComponents
impl StructuralPartialEq for CriticalRequestComponents
Auto Trait Implementations§
impl RefUnwindSafe for CriticalRequestComponents
impl Send for CriticalRequestComponents
impl Sync for CriticalRequestComponents
impl Unpin for CriticalRequestComponents
impl UnwindSafe for CriticalRequestComponents
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more