pub struct RuleSet {
pub id: RuleSetId,
pub loader_id: LoaderId,
pub source_text: String,
pub backend_node_id: Option<BackendNodeId>,
pub url: Option<String>,
pub request_id: Option<RequestId>,
pub error_type: Option<RuleSetErrorType>,
pub error_message: Option<String>,
pub tag: Option<String>,
}Expand description
Corresponds to SpeculationRuleSet
Fields§
§id: RuleSetId§loader_id: LoaderIdIdentifies a document which the rule set is associated with.
source_text: StringSource text of JSON representing the rule set. If it comes from
\<script\> tag, it is the textContent of the node. Note that it is
a JSON for valid case.
See also:
backend_node_id: Option<BackendNodeId>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:
url: Option<String>§request_id: Option<RequestId>§error_type: Option<RuleSetErrorType>Error information
errorMessage is null iff errorType is null.
error_message: Option<String>TODO(https://crbug.com/1425354): Replace this property with structured error.
tag: Option<String>For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md