[−][src]Struct adblock::lists::FilterSet
Manages a set of rules to be added to an Engine
.
To be able to efficiently handle special options like $badfilter
, and to allow optimizations,
all rules must be available when the Engine
is first created. FilterSet
allows assembling a
compound list from multiple different sources before compiling the rules into an Engine
.
Implementations
impl FilterSet
[src]
pub fn new(debug: bool) -> Self
[src]
Creates a new FilterSet
. debug
specifies whether or not to save information about the
original raw filter rules alongside the more compact internal representation. If enabled,
this information will be passed to the corresponding Engine
.
pub fn add_filter_list(&mut self, filter_list: &str, format: FilterFormat)
[src]
Adds the contents of an entire filter list to this FilterSet
. Filters that cannot be
parsed successfully are ignored.
pub fn add_filters(&mut self, filters: &[String], format: FilterFormat)
[src]
Adds a collection of filter rules to this FilterSet
. Filters that cannot be parsed
successfully are ignored.
pub fn add_filter(
&mut self,
filter: &str,
format: FilterFormat
) -> Result<(), FilterParseError>
[src]
&mut self,
filter: &str,
format: FilterFormat
) -> Result<(), FilterParseError>
Adds the string representation of a single filter rule to this FilterSet
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FilterSet
impl Send for FilterSet
impl Sync for FilterSet
impl Unpin for FilterSet
impl UnwindSafe for FilterSet
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> 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, 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>,