[−][src]Struct https_everywhere_lib_core::RuleSets
RuleSets consists of a tuple btreemap of rulesets, keyed by some target FQDN
Methods
impl RuleSets
[src]
pub fn new() -> RuleSets
[src]
Returns a new rulesets struct
pub fn count_targets(&self) -> usize
[src]
Returns the number of targets in the current RuleSets struct as a usize
pub fn clear(&mut self)
[src]
Clears the ruleset btreemap of all values
pub fn add_all_from_json_string(
&mut self,
json_string: &String,
enable_mixed_rulesets: &bool,
ruleset_active_states: &HashMap<String, bool>,
scope: &Option<String>
)
[src]
&mut self,
json_string: &String,
enable_mixed_rulesets: &bool,
ruleset_active_states: &HashMap<String, bool>,
scope: &Option<String>
)
Construct and add new rulesets given a json string of values
Arguments
json_string
- A json string representing the rulesets to addenable_mixed_rulesets
- A bool indicating whether rulesets which trigger mixed content blocking should be enabledrule_active_states
- A HashMap which lets us know whether rulesets have been disabled or enabledscope
- An optional string which indicates the scope of the current batch of rulesets being added (see the ruleset update channels documentation)
pub fn add_all_from_serde_value(
&mut self,
rulesets: Value,
enable_mixed_rulesets: &bool,
ruleset_active_states: &HashMap<String, bool>,
scope: &Option<String>
)
[src]
&mut self,
rulesets: Value,
enable_mixed_rulesets: &bool,
ruleset_active_states: &HashMap<String, bool>,
scope: &Option<String>
)
pub fn potentially_applicable(&self, host: &String) -> Vec<Rc<RuleSet>>
[src]
Return a vector of rulesets that apply to the given host
Arguments
host
- A string which indicates the host to search for potentially applicable rulesets
Trait Implementations
Auto Trait Implementations
impl Unpin for RuleSets
impl !Sync for RuleSets
impl !Send for RuleSets
impl !UnwindSafe for RuleSets
impl !RefUnwindSafe for RuleSets
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,