[−][src]Struct adblock::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
. The debug
argument 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: &str
) -> PyResult<()>
[src]
&mut self,
filter_list: &str,
format: &str
) -> PyResult<()>
Adds the contents of an entire filter list to this FilterSet. Filters that cannot be parsed successfully are ignored.
The format is a string containing either "standard" (ABP/uBO-style) or "hosts".
pub fn add_filters(
&mut self,
filters: Vec<String>,
format: &str
) -> PyResult<()>
[src]
&mut self,
filters: Vec<String>,
format: &str
) -> PyResult<()>
Adds a collection of filter rules to this FilterSet. Filters that cannot be parsed successfully are ignored.
The format is a string containing either "standard" (ABP/uBO-style) or "hosts".
Trait Implementations
impl Clone for FilterSet
[src]
impl<'a> ExtractExt<'a> for &'a FilterSet
[src]
impl<'a> ExtractExt<'a> for &'a mut FilterSet
[src]
impl HasMethodsInventory for FilterSet
[src]
type Methods = Pyo3MethodsInventoryForFilterSet
impl HasProtoRegistry for FilterSet
[src]
impl IntoPy<PyObject> for FilterSet
[src]
impl PyClass for FilterSet
[src]
type Dict = PyClassDummySlot
Specify this class has #[pyclass(dict)]
or not.
type WeakRef = PyClassDummySlot
Specify this class has #[pyclass(weakref)]
or not.
type BaseNativeType = PyAny
The closest native ancestor. This is PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it's PyDict
. Read more
impl PyClassAlloc for FilterSet
[src]
unsafe fn new(py: Python<'_>, subtype: *mut PyTypeObject) -> *mut Self::Layout
[src]
unsafe fn dealloc(py: Python<'_>, self_: *mut Self::Layout)
[src]
impl PyClassSend for FilterSet
[src]
type ThreadChecker = ThreadCheckerStub<FilterSet>
impl PyTypeInfo for FilterSet
[src]
type Type = FilterSet
Type of objects to store in PyObject struct
type BaseType = PyAny
Base class
type Layout = PyCell<Self>
Layout
type BaseLayout = PyCellBase<PyAny>
Layout of Basetype.
type Initializer = PyClassInitializer<Self>
Initializer for layout
type AsRefTarget = PyCell<Self>
Utility type to make AsPyRef work
const NAME: &'static str
[src]
const MODULE: Option<&'static str>
[src]
const DESCRIPTION: &'static str
[src]
const FLAGS: usize
[src]
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
[src]
fn is_instance(object: &PyAny) -> bool
[src]
fn is_exact_instance(object: &PyAny) -> bool
[src]
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> FromPy<T> for T
[src]
impl<'a, T> FromPyObject<'a> for T where
T: PyClass + Clone,
[src]
T: PyClass + Clone,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoPy<U> for T where
U: FromPy<T>,
[src]
U: FromPy<T>,
impl<T> PyClassAlloc for T where
T: PyTypeInfo + PyClassWithFreeList,
[src]
T: PyTypeInfo + PyClassWithFreeList,
unsafe fn new(
py: Python<'_>,
subtype: *mut PyTypeObject
) -> *mut <T as PyTypeInfo>::Layout
[src]
py: Python<'_>,
subtype: *mut PyTypeObject
) -> *mut <T as PyTypeInfo>::Layout
unsafe fn dealloc(py: Python<'_>, self_: *mut <T as PyTypeInfo>::Layout)
[src]
impl<T> PyMethods for T where
T: HasMethodsInventory,
[src]
T: HasMethodsInventory,
fn py_methods() -> Vec<&'static PyMethodDefType>
[src]
impl<T> PyProtoMethods for T where
T: HasProtoRegistry,
[src]
T: HasProtoRegistry,
fn async_methods() -> Option<NonNull<PyAsyncMethods>>
[src]
fn basic_methods() -> Option<NonNull<PyObjectMethods>>
[src]
fn buffer_methods() -> Option<NonNull<PyBufferProcs>>
[src]
fn descr_methods() -> Option<NonNull<PyDescrMethods>>
[src]
fn gc_methods() -> Option<NonNull<PyGCMethods>>
[src]
fn mapping_methods() -> Option<NonNull<PyMappingMethods>>
[src]
fn number_methods() -> Option<NonNull<PyNumberMethods>>
[src]
fn iter_methods() -> Option<NonNull<PyIterMethods>>
[src]
fn sequence_methods() -> Option<NonNull<PySequenceMethods>>
[src]
impl<T> PyTypeObject for T where
T: PyTypeInfo,
[src]
T: PyTypeInfo,
fn type_object(py: Python<'_>) -> &PyType
[src]
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>,