Skip to main content

Request

Type Alias Request 

Source
pub type Request = Request<Body>;
Expand description

HTTP request type.

Aliased Type§

pub struct Request { /* private fields */ }

Trait Implementations§

Source§

impl ApiOperationPart for Request

Available on crate feature openapi only.
Source§

fn modify_api_operation( operation: &mut Operation, route_context: &RouteContext<'_>, schema_generator: &mut SchemaGenerator, )

Modify the OpenAPI operation object. Read more
Source§

impl RequestExt for Request

Source§

async fn extract_from_head<E>(&mut self) -> Result<E>
where E: FromRequestHead + 'static,

Runs an extractor implementing FromRequestHead on the request. Read more
Source§

fn context(&self) -> &ProjectContext

Get the application context. Read more
Source§

fn project_config(&self) -> &ProjectConfig

Get the project configuration. Read more
Source§

fn router(&self) -> &Arc<Router>

Get the router. Read more
Source§

fn app_name(&self) -> Option<&str>

Returns the name of the app that the current route belongs to, or None if the request is not routed. Read more
Source§

fn route_name(&self) -> Option<&str>

Returns the name of the current route. Read more
Source§

fn path_params(&self) -> &PathParams

Get the path parameters. Read more
Source§

fn path_params_mut(&mut self) -> &mut PathParams

Get the path parameters mutably. Read more
Source§

fn content_type(&self) -> Option<&HeaderValue>

Get the content type of the request. Read more
Source§

fn expect_content_type(&mut self, expected: &'static str) -> Result<()>

Expect the content type of the request to be the given value. Read more