Struct lucas_test::http::Request
source · [−]pub struct Request {
pub head: RequestParts,
pub body: Vec<u8, Global>,
}Expand description
Represents an HTTP request from the WebView.
An HTTP request consists of a head and a potentially optional body.
Platform-specific
- Linux: Headers are not exposed.
Fields
head: RequestPartsbody: Vec<u8, Global>Implementations
sourceimpl Request
impl Request
sourcepub fn headers(&self) -> &HeaderMap<HeaderValue>
pub fn headers(&self) -> &HeaderMap<HeaderValue>
Returns a reference to the associated header field map.
sourcepub fn body(&self) -> &Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn body(&self) -> &Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns a reference to the associated HTTP body.
sourcepub fn into_parts(self) -> (RequestParts, Vec<u8, Global>)
pub fn into_parts(self) -> (RequestParts, Vec<u8, Global>)
Consumes the request returning the head and body RequestParts.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> NoneValue for T where
T: Default,
impl<T> NoneValue for T where
T: Default,
type NoneType = T
pub fn null_value() -> T
pub fn null_value() -> T
The none-equivalent value.