pub trait HttpBodyControl: HttpControl {
// Required method
fn body_size(&self) -> usize;
// Provided methods
fn get(&self, range: impl RangeBounds<usize>) -> Option<Vec<u8>> { ... }
fn set(&self, range: impl RangeBounds<usize>, value: &[u8]) { ... }
fn all(&self) -> Option<Vec<u8>> { ... }
fn replace(&self, value: &[u8]) { ... }
fn clear(&self) { ... }
}Expand description
Defines functions to interact with body data
Required Methods§
Provided Methods§
Sourcefn get(&self, range: impl RangeBounds<usize>) -> Option<Vec<u8>>
fn get(&self, range: impl RangeBounds<usize>) -> Option<Vec<u8>>
Get a range of the body block content
Sourcefn set(&self, range: impl RangeBounds<usize>, value: &[u8])
fn set(&self, range: impl RangeBounds<usize>, value: &[u8])
Set a range of the body block content
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".