[][src]Struct adblock::filters::network::NetworkFilter

pub struct NetworkFilter {
    pub mask: NetworkFilterMask,
    pub filter: FilterPart,
    pub opt_domains: Option<Vec<Hash>>,
    pub opt_not_domains: Option<Vec<Hash>>,
    pub redirect: Option<String>,
    pub hostname: Option<String>,
    pub csp: Option<String>,
    pub bug: Option<u32>,
    pub tag: Option<String>,
    pub raw_line: Option<String>,
    pub id: Hash,
    pub opt_domains_union: Option<Hash>,
    pub opt_not_domains_union: Option<Hash>,
    // some fields omitted
}

Fields

mask: NetworkFilterMaskfilter: FilterPartopt_domains: Option<Vec<Hash>>opt_not_domains: Option<Vec<Hash>>redirect: Option<String>hostname: Option<String>csp: Option<String>bug: Option<u32>tag: Option<String>raw_line: Option<String>id: Hashopt_domains_union: Option<Hash>opt_not_domains_union: Option<Hash>

Implementations

impl NetworkFilter[src]

pub fn parse(line: &str, debug: bool) -> Result<Self, NetworkFilterError>[src]

pub fn parse_hosts_style(
    hostname: &str,
    debug: bool
) -> Result<Self, NetworkFilterError>
[src]

Given a hostname, produces an equivalent filter parsed from the form "||hostname^", to emulate the behavior of hosts-style blocking.

pub fn get_id_without_badfilter(&self) -> Hash[src]

pub fn get_id(&self) -> Hash[src]

pub fn get_tokens(&self) -> Vec<Vec<Hash>>[src]

pub fn is_exception(&self) -> bool[src]

pub fn is_hostname_anchor(&self) -> bool[src]

pub fn is_right_anchor(&self) -> bool[src]

pub fn is_left_anchor(&self) -> bool[src]

pub fn is_important(&self) -> bool[src]

pub fn is_redirect(&self) -> bool[src]

pub fn is_explicit_cancel(&self) -> bool[src]

pub fn is_badfilter(&self) -> bool[src]

pub fn is_generic_hide(&self) -> bool[src]

pub fn is_regex(&self) -> bool[src]

pub fn is_complete_regex(&self) -> bool[src]

pub fn is_csp(&self) -> bool[src]

pub fn has_bug(&self) -> bool[src]

Trait Implementations

impl Clone for NetworkFilter[src]

impl Debug for NetworkFilter[src]

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

impl Display for NetworkFilter[src]

impl From<NetworkFilter> for ParsedFilter[src]

impl NetworkMatchable for NetworkFilter[src]

impl Serialize for NetworkFilter[src]

Auto Trait Implementations

impl RefUnwindSafe for NetworkFilter

impl Send for NetworkFilter

impl Sync for NetworkFilter

impl Unpin for NetworkFilter

impl UnwindSafe for NetworkFilter

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.