pub struct RequestInput {Show 20 fields
pub method: HttpMethod,
pub host: String,
pub path: String,
pub headers: BTreeMap<String, String>,
pub query_params: RequestFieldMap,
pub form_fields: RequestFieldMap,
pub content_type: Option<String>,
pub raw_body: Vec<u8>,
pub scheme: String,
pub forwarded_proto: Option<String>,
pub request_id: Option<String>,
pub session_id: Option<String>,
pub session_cookie: Option<String>,
pub flash_cookie: Option<String>,
pub csrf_token: Option<String>,
pub csrf_action: Option<String>,
pub maintenance_bypass_token: Option<String>,
pub principal_id: Option<String>,
pub principal_kind: RequestPrincipalKind,
pub granted_capabilities: HashSet<Capability>,
}Fields§
§method: HttpMethod§host: String§path: String§headers: BTreeMap<String, String>§query_params: RequestFieldMap§form_fields: RequestFieldMap§content_type: Option<String>§raw_body: Vec<u8>§scheme: String§forwarded_proto: Option<String>§request_id: Option<String>§session_id: Option<String>§csrf_token: Option<String>§csrf_action: Option<String>§maintenance_bypass_token: Option<String>§principal_id: Option<String>§principal_kind: RequestPrincipalKind§granted_capabilities: HashSet<Capability>Implementations§
Source§impl RequestInput
impl RequestInput
pub fn new( method: HttpMethod, host: impl Into<String>, path: impl Into<String>, ) -> Result<Self, RouteBuildError>
pub fn with_scheme(self, scheme: impl Into<String>) -> Self
pub fn with_forwarded_proto(self, proto: impl Into<String>) -> Self
pub fn with_request_id(self, request_id: impl Into<String>) -> Self
pub fn with_session_id(self, session_id: impl Into<String>) -> Self
pub fn with_csrf_token(self, csrf_token: impl Into<String>) -> Self
pub fn with_csrf_action(self, csrf_action: impl Into<String>) -> Self
pub fn with_maintenance_bypass_token( self, bypass_token: impl Into<String>, ) -> Self
pub fn with_principal(self, principal_id: impl Into<String>) -> Self
pub fn with_service_account_principal( self, principal_id: impl Into<String>, ) -> Self
pub fn with_query_param( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_form_field( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_query_params(self, params: RequestFieldMap) -> Self
pub fn with_form_fields(self, fields: RequestFieldMap) -> Self
pub fn with_headers(self, headers: BTreeMap<String, String>) -> Self
pub fn with_content_type(self, content_type: impl Into<String>) -> Self
pub fn with_raw_body(self, raw_body: Vec<u8>) -> Self
pub fn query_param(&self, name: &str) -> Option<&str>
pub fn form_field(&self, name: &str) -> Option<&str>
pub fn grant_capability(self, capability: Capability) -> Self
Trait Implementations§
Source§impl Clone for RequestInput
impl Clone for RequestInput
Source§fn clone(&self) -> RequestInput
fn clone(&self) -> RequestInput
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 RequestInput
impl Debug for RequestInput
Source§impl PartialEq for RequestInput
impl PartialEq for RequestInput
impl Eq for RequestInput
impl StructuralPartialEq for RequestInput
Auto Trait Implementations§
impl Freeze for RequestInput
impl RefUnwindSafe for RequestInput
impl Send for RequestInput
impl Sync for RequestInput
impl Unpin for RequestInput
impl UnsafeUnpin for RequestInput
impl UnwindSafe for RequestInput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more