pub struct Request {
pub method: Method,
pub scheme: Option<Scheme>,
pub authority: Option<Authority>,
pub path_with_query: Option<PathAndQuery>,
pub headers: Arc<HeaderMap>,
pub options: Option<Arc<RequestOptions>>,
/* private fields */
}
Available on crate feature
p3
only.Expand description
The concrete type behind a wasi:http/types/request
resource.
Fields§
§method: Method
The method of the request.
scheme: Option<Scheme>
The scheme of the request.
The authority of the request.
path_with_query: Option<PathAndQuery>
The path and query of the request.
headers: Arc<HeaderMap>
The request headers.
options: Option<Arc<RequestOptions>>
Request options.
Implementations§
Source§impl Request
impl Request
Sourcepub fn new(
method: Method,
scheme: Option<Scheme>,
authority: Option<Authority>,
path_with_query: Option<PathAndQuery>,
headers: impl Into<Arc<HeaderMap>>,
options: Option<Arc<RequestOptions>>,
body: impl Into<BoxBody<Bytes, ErrorCode>>,
) -> (Self, impl Future<Output = Result<(), ErrorCode>> + Send + 'static)
pub fn new( method: Method, scheme: Option<Scheme>, authority: Option<Authority>, path_with_query: Option<PathAndQuery>, headers: impl Into<Arc<HeaderMap>>, options: Option<Arc<RequestOptions>>, body: impl Into<BoxBody<Bytes, ErrorCode>>, ) -> (Self, impl Future<Output = Result<(), ErrorCode>> + Send + 'static)
Auto Trait Implementations§
impl !Freeze for Request
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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