pub struct RequestBody {
pub log: bool,
/* private fields */
}Fields§
§log: boolImplementations§
Source§impl RequestBody
impl RequestBody
pub fn new(req: Request<Incoming>) -> Self
pub fn params(&self) -> &HashMap<String, String>
pub fn param(&self, key: &str) -> String
pub fn method(&self) -> &Method
pub fn path(&self) -> &str
pub fn headers(&self) -> &HeaderMap
pub fn set_headers(&mut self, key: &str, value: &str)
pub fn get_headers(&mut self, key: &str) -> Option<&HeaderValue>
pub fn uri(&self) -> &Uri
pub fn version(&self) -> Version
pub fn query(&self) -> HashMap<String, String>
pub fn query_param(&self, key: &str) -> Option<String>
pub async fn bytes(&mut self) -> Result<Bytes, Error>
pub async fn text(&mut self) -> Result<String, Box<dyn Error>>
pub async fn json<T: DeserializeOwned>(&mut self) -> Result<T, Box<dyn Error>>
pub async fn form_data(&mut self) -> Result<FormData, BoltError>
pub async fn files(&mut self) -> Result<Vec<FormFile>, BoltError>
pub async fn file(&mut self, name: &str) -> Result<Option<FormFile>, BoltError>
pub async fn cleanup(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RequestBody
impl !RefUnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl Unpin for RequestBody
impl !UnwindSafe for RequestBody
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