pub enum RequestDestination {
Show 22 variants
Audio,
AudioWorklet,
Document,
Embed,
Font,
Frame,
IFrame,
Image,
Manifest,
None,
Object,
PaintWorklet,
Report,
Script,
ServiceWorker,
SharedWorker,
Style,
Track,
Video,
WebIdentity,
Worker,
Xslt,
}Expand description
The Request Destination specifies what the destination of this
fetch is.
Variants§
Audio
HTML <audio>
AudioWorklet
audioScript.addModule()
Document
A website is loaded, and this is e.g. the HTML document.
Embed
HTML <embed>
Font
CSS @font-face
Frame
HTML <frame>
IFrame
HTML <iframe>
Image
§"" initiator
<img src>/faviconresource- SVG
<image> - CSS
background-image - CSS
cursor - CSS
list-style-image
§imageset initiator
- HTML
<img srcset> - HTML
<picture>
Manifest
<link rel=manifest>
None
The empty string "". This can come from one of:
§"" initiator
navigator.sendBeacon()EventSource<a ping=""><area ping="">fetch()XMLHttpRequestWebSocket- Cache API
§download initiator
- HTML
downloadattribute - Save Link As… in the browser UI
§prefetch initiator
- HTML
<link rel=prefetch>
§prerender initiator
- HTML
<link rel=prerender>
Object
HTML <object>
PaintWorklet
CSS.paintWorklet.addModule()
Report
CSP, NEL reports.
Script
<script>importScripts()
ServiceWorker
navigator.serviceWorker.register()
SharedWorker
Style
- HTML
<link rel=stylesheet> - CSS
@import
Track
HTML <track>
Video
HTML <video>
WebIdentity
Federated Credential Management requests
Worker
Worker
Xslt
<?xml-stylesheet>
Implementations§
Source§impl RequestDestination
impl RequestDestination
Sourcepub fn is_script_like(&self) -> bool
pub fn is_script_like(&self) -> bool
Specifies if the request is initiated by a script load, or activated by some features in JavaScript.
§Specification Warning
Algorithms that use script-like should also consider “xslt” as that
too can cause script execution. It is not included in the list as it is
not always relevant and might require different behavior.
§Specifications
Trait Implementations§
Source§impl AsRef<str> for RequestDestination
impl AsRef<str> for RequestDestination
Source§impl Clone for RequestDestination
impl Clone for RequestDestination
Source§fn clone(&self) -> RequestDestination
fn clone(&self) -> RequestDestination
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequestDestination
impl Debug for RequestDestination
Source§impl Default for RequestDestination
impl Default for RequestDestination
Source§fn default() -> RequestDestination
fn default() -> RequestDestination
Source§impl Ord for RequestDestination
impl Ord for RequestDestination
Source§fn cmp(&self, other: &RequestDestination) -> Ordering
fn cmp(&self, other: &RequestDestination) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RequestDestination
impl PartialEq for RequestDestination
Source§impl PartialOrd for RequestDestination
impl PartialOrd for RequestDestination
impl Copy for RequestDestination
impl Eq for RequestDestination
impl StructuralPartialEq for RequestDestination
Auto Trait Implementations§
impl Freeze for RequestDestination
impl RefUnwindSafe for RequestDestination
impl Send for RequestDestination
impl Sync for RequestDestination
impl Unpin for RequestDestination
impl UnwindSafe for RequestDestination
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.