[−][src]Struct adblock::filters::network::NetworkFilter
Fields
mask: NetworkFilterMask
filter: FilterPart
opt_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: Hash
opt_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]
hostname: &str,
debug: bool
) -> Result<Self, NetworkFilterError>
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]
fn clone(&self) -> NetworkFilter
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NetworkFilter
[src]
impl<'de> Deserialize<'de> for NetworkFilter
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for NetworkFilter
[src]
impl From<NetworkFilter> for ParsedFilter
[src]
fn from(v: NetworkFilter) -> Self
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,