Crate filter_list_manager_ffi

Source

Modules§

flm_call_protobuf
A dispatcher module that passes the FFI function call to the right method internally on the Rust side
manager
Filter list manager library main facade interface.
outer_error
storage
Root module of data storage operations

Structs§

ActiveRulesInfo
Represents list of active (not disabled) rules with extra filter data
Configuration
Configuration object
DisabledRulesRaw
List of disabled rules separated by line breaks + filter id
FLMHandle
Opaque handle for external world
FilterGroup
FilterListGroup represents a group of filter lists that have similar purpose.
FilterListManager
FilterListManagerConstants
Structure used for passing constants through FFI
FilterListManagerImpl
Default implementation for FilterListManager
FilterListMetadata
Metadata for a remote filter list. This structure represents metadata parsed from the list content and it is exposed via fetch_filter_list_metadata.
FilterListMetadataWithBody
Metadata (with body) for a remote filter list.
FilterListRules
FilterListRules represents filter list rules. Note, that we should store both the rules and disabled rules. This is required to be able to update the rules without caring about individual rule status. I.e. if you once disabled ||example.org^ it should stay disabled even the new version of the list has new lines with the same rule.
FilterListRulesRaw
This contains rules and disabled_rules just as strings instead of vectors in the base type. See the [FilterListRules] for more info.
FilterTag
FilterListTag represents a tag of a filter list. A filter list may have multiple tags.
FullFilterList
FullFilterList represents a filter list and all its associated metadata.
RulesCountByFilter
List of rules count + filter id
RustResponse
Container for rust-formed responses into external world UNSAFE: You must manually control the release of any types folded into the “response”
StoredFilterMetadata
The lightweight analog of crate::FullFilterList without filter contents
UpdateFilterError
Container for filter updating error
UpdateResult
Filters update result container.

Enums§

FLMError
General purpose error enum for all crate::FilterListManager methods
FilterListType
A filter lists type of current crate::FilterListManager instance
FilterParserError
Errors for filter parser module
HttpClientError
Common HTTP client errors enum
IOError
General I/O Errors enum
RequestProxyMode
Proxy mode of operation for requests
RustResponseType
Discriminant for RustResponse result_data value

Constants§

CUSTOM_FILTERS_GROUP_ID
Group ID for custom filters
DNS_FILTERS_DATABASE_FILENAME
Database filename for crate::FilterListType::DNS
MAXIMUM_CUSTOM_FILTER_ID
Custom filters ids must be in range
MINIMUM_CUSTOM_FILTER_ID
Custom filters ids must be in range
SERVICE_GROUP_ID
Service group id for special filters
SMALLEST_POSSIBLE_FILTER_ID
Smallest possible filter id value. -2^53 You can safely occupy any filter with an id lower than this number. The library is guaranteed to never create a filter with this id.
STANDARD_FILTERS_DATABASE_FILENAME
Database filename for crate::FilterListType::STANDARD
USER_RULES_FILTER_LIST_ID
Filter ID for special filter for user rules

Traits§

FilterListManager
FilterListManager is the interface of a filter list manager.

Functions§

flm_default_configuration_protobuf
Makes default Configuration object as protobuf in RustResponse
flm_free_handle
Drops FLMHandle
flm_free_response
Frees memory of RustResponse objects and their data. NOTE: Actions for each discriminant are different.
flm_get_constants
Getter for the set of FilterListManager constants
flm_init_protobuf
Makes an FLM object and returns opaque pointer of FLMHandle
make_constants_structure
Create constants structure
make_default_configuration
Default configuration factory

Type Aliases§

FLMResult
Customized Result with error FLMError
FilterId
Filter list id type alias
Locale
ISO language code (pt) or ISO country code (language_COUNTRY) (pt_BR)