[−][src]Struct https_everywhere_lib_wasm::RuleSets
A newtype for rulesets, wrapping all the JS functionality
Methods
impl RuleSets[src]
pub fn new() -> RuleSets[src]
Returns a new JsRulesets struct
pub fn count_targets(&self) -> usize[src]
Returns the number of targets in the current JsRuleSets struct as a usize
pub fn add_all_from_js_array(
&mut self,
array: &Array,
enable_mixed_rulesets: &Boolean,
rule_active_states: &JsValue,
scope: &JsValue
)
&mut self,
array: &Array,
enable_mixed_rulesets: &Boolean,
rule_active_states: &JsValue,
scope: &JsValue
)
Construct and add new rulesets given a JS array of values
Arguments
array- A JS Array object of rulesetsenable_mixed_rulesets- A JS Boolean indicating whether rulesets which trigger mixed content blocking should be enabledrule_active_states- A JS object which lets us know whether rulesets have been disabled or enabledscope- An optional JS string which indicates the scope of the current batch of rulesets being added (see the ruleset update channels documentation)
pub fn print_targets(&self)[src]
Print the entire RuleSets struct
pub fn remove_ruleset(&mut self, ruleset_jsval: &JsValue)[src]
Remove a RuleSet from the RuleSets struct
pub fn potentially_applicable(&self, host: &JsValue) -> JsValue[src]
Return a JS set of rulesets that apply to the given host
Arguments
host- A JS string which indicates the host to search for potentially applicable rulesets
Trait Implementations
impl From<RuleSets> for JsValue[src]
impl Debug for RuleSets[src]
impl IntoWasmAbi for RuleSets[src]
type Abi = u32
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self) -> u32[src]
impl RefFromWasmAbi for RuleSets[src]
type Abi = u32
The wasm ABI type references to Self are recovered from.
type Anchor = Ref<'static, RuleSets>
The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor[src]
impl WasmDescribe for RuleSets[src]
impl FromWasmAbi for RuleSets[src]
type Abi = u32
The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more
unsafe fn from_abi(js: u32) -> Self[src]
impl OptionIntoWasmAbi for RuleSets[src]
impl OptionFromWasmAbi for RuleSets[src]
impl RefMutFromWasmAbi for RuleSets[src]
Auto Trait Implementations
impl !Send for RuleSets
impl Unpin for RuleSets
impl !Sync for RuleSets
impl !UnwindSafe for RuleSets
impl !RefUnwindSafe for RuleSets
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi, [src]
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi