DomainFilterBuilder

Struct DomainFilterBuilder 

Source
pub struct DomainFilterBuilder<H: BuildHasher + Default> { /* private fields */ }

Implementations§

Source§

impl<H: BuildHasher + Default> DomainFilterBuilder<H>

Source

pub fn new() -> Self

Source

pub fn add_allow_domain(&self, domain: Domain)

Source

pub fn add_disallow_domain(&self, domain: Domain)

Source

pub fn add_allow_subdomain(&self, domain: Domain)

Source

pub fn add_disallow_subdomain(&self, domain: Domain)

Source

pub fn add_allow_ip_addr(&self, ip: IpAddr)

Source

pub fn add_disallow_ip_addr(&self, ip: IpAddr)

Source

pub fn add_allow_ip_subnet(&self, net: IpNet)

Source

pub fn add_disallow_ip_subnet(&self, ip: IpNet)

Source

pub fn add_adblock_rule(&self, rule: &str)

Source

pub fn add_allow_regex(&self, re: &str)

Source

pub fn add_disallow_regex(&self, re: &str)

Source

pub fn to_domain_filter(self) -> DomainFilter<H>

Trait Implementations§

Source§

impl<H: Default + BuildHasher + Default> Default for DomainFilterBuilder<H>

Source§

fn default() -> DomainFilterBuilder<H>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<H> !Freeze for DomainFilterBuilder<H>

§

impl<H> !RefUnwindSafe for DomainFilterBuilder<H>

§

impl<H> Send for DomainFilterBuilder<H>
where H: Send,

§

impl<H> Sync for DomainFilterBuilder<H>
where H: Sync + Send,

§

impl<H> Unpin for DomainFilterBuilder<H>
where H: Unpin,

§

impl<H> UnwindSafe for DomainFilterBuilder<H>
where H: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.