pub struct Request { /* private fields */ }Expand description
The Request class.
Implementations§
Source§impl Request
impl Request
Sourcepub fn new(
url: Url,
initiator: RequestInitiator,
destination: RequestDestination,
mode: RequestMode,
referrer: RequestReferrer,
) -> Self
pub fn new( url: Url, initiator: RequestInitiator, destination: RequestDestination, mode: RequestMode, referrer: RequestReferrer, ) -> Self
Create a new [Request][https://fetch.spec.whatwg.org/#request-class].
Sourcepub fn get_document(url: Url, referrer: RequestReferrer) -> Self
pub fn get_document(url: Url, referrer: RequestReferrer) -> Self
A helper to create a Request, specifically for Document retrieval with navigation (i.e. top-level browser contexts).
Sourcepub fn accept_header_value(&self) -> &str
pub fn accept_header_value(&self) -> &str
Compute or get the value of the Accept header, which specifies
what type of content is acceptable for us to handle.
Trait Implementations§
impl StructuralPartialEq for Request
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