pub struct HttpRequest { /* private fields */ }Expand description
Nova Request definition
Implementations§
Source§impl HttpRequest
impl HttpRequest
Sourcepub fn body_string(&self) -> String
pub fn body_string(&self) -> String
Extract body string from request
Sourcepub fn put_header(&mut self, key: &str, value: &str)
pub fn put_header(&mut self, key: &str, value: &str)
Put header
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpRequest
impl Debug for HttpRequest
Source§impl Default for HttpRequest
impl Default for HttpRequest
Source§fn default() -> HttpRequest
fn default() -> HttpRequest
Returns the “default value” for a type. Read more
Source§impl Display for HttpRequest
impl Display for HttpRequest
Source§impl FromStr for HttpRequest
impl FromStr for HttpRequest
Source§type Err = ServerError
type Err = ServerError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<HttpRequest, <HttpRequest as FromStr>::Err>
fn from_str(s: &str) -> Result<HttpRequest, <HttpRequest as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl RequestExt for HttpRequest
impl RequestExt for HttpRequest
Source§fn get_route_path(&self) -> (RequestType, String)
fn get_route_path(&self) -> (RequestType, String)
Extract route details
Source§fn update_path(self, route: &str) -> HttpRequest
fn update_path(self, route: &str) -> HttpRequest
Update path map from route
Source§impl<S> SerdeRequest<S> for HttpRequestwhere
S: for<'a> Deserialize<'a>,
impl<S> SerdeRequest<S> for HttpRequestwhere
S: for<'a> Deserialize<'a>,
Source§type Err = ServerError
type Err = ServerError
Parsing Error type
Source§fn get_serde_body(&self) -> String
fn get_serde_body(&self) -> String
extract body for parsing
Source§fn parse_error(err: impl Error) -> <HttpRequest as SerdeRequest<S>>::Err
fn parse_error(err: impl Error) -> <HttpRequest as SerdeRequest<S>>::Err
parse serde error
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
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