pub struct Fetch(/* private fields */);Expand description
An HTTP(S) request to a URL prefix declared in the manifest.
Implementations§
Source§impl Fetch
impl Fetch
Sourcepub fn get(url: &str, headers: &[(&str, &str)]) -> Fetch
pub fn get(url: &str, headers: &[(&str, &str)]) -> Fetch
headers may contain Range, Accept, If-None-Match, If-Modified-Since.
pub fn head(url: &str) -> Fetch
pub fn state(&self) -> FetchState
pub fn header(&self, name: &str) -> Option<String>
pub fn body(&self) -> Vec<u8> ⓘ
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 UnsafeUnpin 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