pub struct RuleSetBuilder<'a> { /* private fields */ }Implementations§
Source§impl<'a> RuleSetBuilder<'a>
impl<'a> RuleSetBuilder<'a>
Sourcepub fn backend_node_id(self, backend_node_id: BackendNodeId) -> Self
pub fn backend_node_id(self, backend_node_id: BackendNodeId) -> Self
A speculation rule set is either added through an inline ‘<script>’ tag or through an external resource via the ‘Speculation-Rules’ HTTP header. For the first case, we include the BackendNodeId of the relevant ‘<script>’ tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled.
See also:
pub fn url(self, url: impl Into<Cow<'a, str>>) -> Self
pub fn request_id(self, request_id: RequestId<'a>) -> Self
Sourcepub fn error_type(self, error_type: impl Into<RuleSetErrorType>) -> Self
pub fn error_type(self, error_type: impl Into<RuleSetErrorType>) -> Self
Error information ‘errorMessage’ is null iff ‘errorType’ is null.
Sourcepub fn error_message(self, error_message: impl Into<Cow<'a, str>>) -> Self
pub fn error_message(self, error_message: impl Into<Cow<'a, str>>) -> Self
TODO(https://crbug.com/1425354): Replace this property with structured error.
Sourcepub fn tag(self, tag: impl Into<Cow<'a, str>>) -> Self
pub fn tag(self, tag: impl Into<Cow<'a, str>>) -> Self
For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
pub fn build(self) -> RuleSet<'a>
Auto Trait Implementations§
impl<'a> Freeze for RuleSetBuilder<'a>
impl<'a> RefUnwindSafe for RuleSetBuilder<'a>
impl<'a> Send for RuleSetBuilder<'a>
impl<'a> Sync for RuleSetBuilder<'a>
impl<'a> Unpin for RuleSetBuilder<'a>
impl<'a> UnsafeUnpin for RuleSetBuilder<'a>
impl<'a> UnwindSafe for RuleSetBuilder<'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