[][src]Struct adblock::cosmetic_filter_cache::UrlSpecificResources

pub struct UrlSpecificResources {
    pub hide_selectors: HashSet<String>,
    pub style_selectors: HashMap<String, Vec<String>>,
    pub exceptions: HashSet<String>,
    pub injected_script: String,
    pub generichide: bool,
}

Contains cosmetic filter information intended to be used on a particular URL.

hide_selectors is a set of any CSS selector on the page that should be hidden, i.e. styled as { display: none !important; }.

style_selectors is a map of CSS selectors on the page to respective non-hide style rules, i.e. any required styles other than display: none.

exceptions is a set of any class or id CSS selectors that should not have generic rules applied. In practice, these should be passed to class_id_stylesheet and not used otherwise.

injected_script is the Javascript code for any scriptlets that should be injected into the page.

generichide is set to true if there is a corresponding $generichide exception network filter. If so, the page should not query for additional generic rules using hidden_class_id_selectors.

Fields

hide_selectors: HashSet<String>style_selectors: HashMap<String, Vec<String>>exceptions: HashSet<String>injected_script: Stringgenerichide: bool

Implementations

impl UrlSpecificResources[src]

pub fn empty() -> Self[src]

Trait Implementations

impl Debug for UrlSpecificResources[src]

impl<'de> Deserialize<'de> for UrlSpecificResources[src]

impl Eq for UrlSpecificResources[src]

impl PartialEq<UrlSpecificResources> for UrlSpecificResources[src]

impl Serialize for UrlSpecificResources[src]

impl StructuralEq for UrlSpecificResources[src]

impl StructuralPartialEq for UrlSpecificResources[src]

Auto Trait Implementations

impl RefUnwindSafe for UrlSpecificResources

impl Send for UrlSpecificResources

impl Sync for UrlSpecificResources

impl Unpin for UrlSpecificResources

impl UnwindSafe for UrlSpecificResources

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.