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<u64>,
is_stream: bool,
) -> Result<(), SanitizeError>
pub fn apply_to_response( &self, response: &mut Response<Bytes>, overriden_len: Option<u64>, is_stream: bool, ) -> Result<(), SanitizeError>
Applies the critical components’ info to the response
.
For now applies range and replaces the accept-ranges
header.
IF is_stream
is false, else ranges aren’t supported and we cancel.
§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
impl Eq for CriticalRequestComponents
impl StructuralPartialEq for CriticalRequestComponents
Auto Trait Implementations§
impl Freeze for CriticalRequestComponents
impl RefUnwindSafe for CriticalRequestComponents
impl Send for CriticalRequestComponents
impl Sync for CriticalRequestComponents
impl Unpin for CriticalRequestComponents
impl UnwindSafe for CriticalRequestComponents
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more