pub struct RuleSet {
pub name: String,
pub rules: Vec<Rule>,
pub exclusions: Option<String>,
pub cookierules: Option<Vec<CookieRule>>,
pub active: bool,
pub default_state: bool,
pub scope: Rc<Option<String>>,
pub note: Option<String>,
}
Expand description
A RuleSet is a grouping of rules which act on some target
Fields§
§name: String
§rules: Vec<Rule>
§exclusions: Option<String>
§active: bool
§default_state: bool
§scope: Rc<Option<String>>
§note: Option<String>
Implementations§
Trait Implementations§
Source§impl JsRuleSet for RuleSet
impl JsRuleSet for RuleSet
Source§fn add_exclusions(&mut self, exclusions_array: &Array)
fn add_exclusions(&mut self, exclusions_array: &Array)
Add exclusions to the ruleset from an exclusions JS array
Add cookierules to the ruleset from a cookierules array
Source§fn is_equivalent_to(&self, ruleset_jsval: &JsValue) -> bool
fn is_equivalent_to(&self, ruleset_jsval: &JsValue) -> bool
Return a bool indicating whether the given JS ruleset is equivalent
Source§impl ToJavaScript for RuleSet
impl ToJavaScript for RuleSet
Source§fn to_javascript(&self) -> JsValue
fn to_javascript(&self) -> JsValue
Convert a ruleset to a JS object
Auto Trait Implementations§
impl Freeze for RuleSet
impl RefUnwindSafe for RuleSet
impl !Send for RuleSet
impl !Sync for RuleSet
impl Unpin for RuleSet
impl UnwindSafe for RuleSet
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