pub struct Fetch { /* private fields */ }Expand description
This struct contains the Fetch object, which can be used to fetch resources using the internet. This object can be safely shared across components and threads.
Implementations§
Source§impl Fetch
impl Fetch
Sourcepub fn create_instantaneous_response(
&self,
request: Arc<Request>,
response: FetchResponse,
) -> FetchPromise ⓘ
pub fn create_instantaneous_response( &self, request: Arc<Request>, response: FetchResponse, ) -> FetchPromise ⓘ
Create a new FetchPromise that resolves instantaneously.
Sourcepub fn with_user_agent<S>(user_agent: S) -> Self
pub fn with_user_agent<S>(user_agent: S) -> Self
Create a new Fetch object.
Sourcepub fn fetch(&self, request: Request) -> FetchPromise ⓘ
pub fn fetch(&self, request: Request) -> FetchPromise ⓘ
Load the resource associated with the request
asynchronously.
Sourcepub fn fetch_document(
&self,
url: Url,
referrer: RequestReferrer,
) -> FetchPromise ⓘ
pub fn fetch_document( &self, url: Url, referrer: RequestReferrer, ) -> FetchPromise ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fetch
impl !RefUnwindSafe for Fetch
impl Send for Fetch
impl Sync for Fetch
impl Unpin for Fetch
impl !UnwindSafe for Fetch
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