pub struct PreloadingAttemptKey<'a> { /* private fields */ }Expand description
A key that identifies a preloading attempt.
The url used is the url specified by the trigger (i.e. the initial URL), and not the final url that is navigated to. For example, prerendering allows same-origin main frame navigations during the attempt, but the attempt is still keyed with the initial URL.
Implementations§
Source§impl<'a> PreloadingAttemptKey<'a>
impl<'a> PreloadingAttemptKey<'a>
Sourcepub fn builder(
loader_id: LoaderId<'a>,
action: impl Into<SpeculationAction>,
url: impl Into<Cow<'a, str>>,
) -> PreloadingAttemptKeyBuilder<'a>
pub fn builder( loader_id: LoaderId<'a>, action: impl Into<SpeculationAction>, url: impl Into<Cow<'a, str>>, ) -> PreloadingAttemptKeyBuilder<'a>
Creates a builder for this type with the required parameters:
loader_id:action:url:
pub fn loader_id(&self) -> &LoaderId<'a>
pub fn action(&self) -> &SpeculationAction
pub fn url(&self) -> &str
pub fn form_submission(&self) -> Option<bool>
pub fn target_hint(&self) -> Option<&SpeculationTargetHint>
Trait Implementations§
Source§impl<'a> Clone for PreloadingAttemptKey<'a>
impl<'a> Clone for PreloadingAttemptKey<'a>
Source§fn clone(&self) -> PreloadingAttemptKey<'a>
fn clone(&self) -> PreloadingAttemptKey<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for PreloadingAttemptKey<'a>
impl<'a> Debug for PreloadingAttemptKey<'a>
Source§impl<'a> Default for PreloadingAttemptKey<'a>
impl<'a> Default for PreloadingAttemptKey<'a>
Source§fn default() -> PreloadingAttemptKey<'a>
fn default() -> PreloadingAttemptKey<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for PreloadingAttemptKey<'a>
impl<'de, 'a> Deserialize<'de> for PreloadingAttemptKey<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for PreloadingAttemptKey<'a>
impl<'a> RefUnwindSafe for PreloadingAttemptKey<'a>
impl<'a> Send for PreloadingAttemptKey<'a>
impl<'a> Sync for PreloadingAttemptKey<'a>
impl<'a> Unpin for PreloadingAttemptKey<'a>
impl<'a> UnsafeUnpin for PreloadingAttemptKey<'a>
impl<'a> UnwindSafe for PreloadingAttemptKey<'a>
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