Struct BoundsBuilder

Source
pub struct BoundsBuilder<'a> { /* private fields */ }
Expand description

Build a set of string matching rules

Implementations§

Source§

impl<'a> BoundsBuilder<'a>

Source

pub fn new() -> Self

Source

pub fn as_vec(&self) -> Vec<StringBounds<'a>>

Return a vector of StringBounds enum rules for use with filter_all_conditional()

Source

pub fn starts_with_ci(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add a “starts_with” rule with a positive flags in case-insensitive mode

Source

pub fn starts_with_ci_alphanum( &mut self, pattern: &'a str, is_positive: bool, ) -> Self

Add a “starts_with” rule with a positive flags in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn starts_with_cs(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add a “starts_with” rule with a positive flag in case-sensitive mode

Source

pub fn starting_with( &mut self, pattern: &'a str, case_insensitive: bool, ) -> Self

Add a positive “starts_with” rule with a case-insensitive flag

Source

pub fn starting_with_ci(&mut self, pattern: &'a str) -> Self

Add a positive “starts_with” rule in case-insensitive mode

Source

pub fn starting_with_ci_alphanum(&mut self, pattern: &'a str) -> Self

Add a positive “starts_with” rule in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn starting_with_cs(&mut self, pattern: &'a str) -> Self

Add a positive “starts_with” rule in case-sensitive mode

Source

pub fn not_starting_with( &mut self, pattern: &'a str, case_insensitive: bool, ) -> Self

Add a negative “starts_with” rule with a case-insensitive flag

Source

pub fn not_starting_with_ci(&mut self, pattern: &'a str) -> Self

Add a negative “starts_with” rule in case-insensitive mode

Source

pub fn not_starting_with_ci_alphanum(&mut self, pattern: &'a str) -> Self

Add a negative “starts_with” rule in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn not_starting_with_cs(&mut self, pattern: &'a str) -> Self

Add a negative “starts_with” rule in case-sensitive mode

Source

pub fn contains( &mut self, pattern: &'a str, is_positive: bool, case_insensitive: bool, ) -> Self

Add a “contains” rule with a positive flag in case-insensitive mode

Source

pub fn contains_ci_alphanum( &mut self, pattern: &'a str, is_positive: bool, ) -> Self

Add a “contains” rule with a positive flags in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn contains_ci(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add a “contains” rule with a positive flags in case-insensitive mode

Source

pub fn contains_cs(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add a “contains” rule with a positive flags in case-sensitive mode

Source

pub fn containing(&mut self, pattern: &'a str, case_insensitive: bool) -> Self

Add a positive “contains” rule with a case-insensitive flag

Source

pub fn containing_ci(&mut self, pattern: &'a str) -> Self

Add a positive “contains” rule in case-insensitive mode

Source

pub fn containing_ci_alphanum(&mut self, pattern: &'a str) -> Self

Add a positive “contains” rule in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn containing_cs(&mut self, pattern: &'a str) -> Self

Add a positive “contains” rule as true in case-sensitive mode

Source

pub fn not_containing( &mut self, pattern: &'a str, case_insensitive: bool, ) -> Self

Add a negative “contains” rule with a case-insensitive flag

Source

pub fn not_containing_ci(&mut self, pattern: &'a str) -> Self

Add a negative “contains” rule in case-insensitive mode

Source

pub fn not_containing_ci_alphanum(&mut self, pattern: &'a str) -> Self

Add a negative “contains” rule in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn not_containing_cs(&mut self, pattern: &'a str) -> Self

Add a negative “contains” rule in case-sensitive mode

Source

pub fn ends_with_ci(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add an “ends_with” rule with a positive flag in case-insensitive mode

Source

pub fn ends_with_ci_alphanum( &mut self, pattern: &'a str, is_positive: bool, ) -> Self

Add a “ends_with” rule with a positive flags in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn ends_with_cs(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add an “ends_with” rule with a positive flag in case-sensitive mode

Source

pub fn ending_with(&mut self, pattern: &'a str, case_insensitive: bool) -> Self

Add a positive “ends_with” rule with a case-insensitive flag

Source

pub fn ending_with_ci(&mut self, pattern: &'a str) -> Self

Add a positive “ends_with” rule in case-insensitive mode

Source

pub fn ending_with_ci_alphanum(&mut self, pattern: &'a str) -> Self

Add a positive “ends_with” rule in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn ending_with_cs(&mut self, pattern: &'a str) -> Self

Add a positive “ends_with” rule in case-sensitive mode

Source

pub fn not_ending_with( &mut self, pattern: &'a str, case_insensitive: bool, ) -> Self

Add a negative “ends_with” rule with a case-insensitive flag

Source

pub fn not_ending_with_ci(&mut self, pattern: &'a str) -> Self

Add a negative “ends_with” rule in case-insensitive mode

Source

pub fn not_ending_with_ci_alphanum(&mut self, pattern: &'a str) -> Self

Add a negative “ends_with” rule in case-insensitive mode evaluating only alphanumeric characters

Source

pub fn not_ending_with_cs(&mut self, pattern: &'a str) -> Self

Add a negative “ends_with” in case-sensitive mode

Source

pub fn matches_whole( &mut self, pattern: &'a str, is_positive: bool, case_insensitive: bool, ) -> Self

Add an “whole_match” rule with a positive and case-insensitive flags

Source

pub fn matches_whole_ci(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add an “whole_match” rule with a positive flag in case-sensitive mode

Source

pub fn matches_whole_cs(&mut self, pattern: &'a str, is_positive: bool) -> Self

Add an “whole_match” rule with a positive flag in case-insensitive mode

Source

pub fn is(&mut self, pattern: &'a str, case_insensitive: bool) -> Self

Source

pub fn is_ci(&mut self, pattern: &'a str) -> Self

Source

pub fn is_not(&mut self, pattern: &'a str, case_insensitive: bool) -> Self

Source

pub fn is_not_ci(&mut self, pattern: &'a str) -> Self

Source

pub fn is_not_cs(&mut self, pattern: &'a str) -> Self

Source

pub fn and(&mut self, rules: BoundsBuilder<'a>) -> Self

Source

pub fn or(&mut self, rules: BoundsBuilder<'a>) -> Self

Source

pub fn or_true( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, position: BoundsPosition, ) -> Self

Source

pub fn or_starts_with( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn or_starting_with_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_starting_with_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_starting_with_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_contains( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn or_containing_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_containing_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_containing_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_ends_with( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn or_ending_with_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_ending_with_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_ending_with_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_is(&mut self, patterns: &'a [&str], case_mode: CaseMatchMode) -> Self

Source

pub fn or_is_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_is_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn or_is_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_true( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, position: BoundsPosition, ) -> Self

Source

pub fn and_false( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, position: BoundsPosition, ) -> Self

Source

pub fn and_starts_with( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn and_not_starts_with( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn and_starting_with_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_starting_with_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_starting_with_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_starting_with_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_starting_with_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_starting_with_ci_alphanum( &mut self, patterns: &'a [&str], ) -> Self

Source

pub fn and_contains( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn and_not_contains( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn and_containing_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_containing_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_containing_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_containing_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_containing_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_containing_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_ends_with( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn and_not_ends_with( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn and_ending_with_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_ending_with_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_ending_with_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_ending_with_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_ending_with_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_not_ending_with_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_is(&mut self, patterns: &'a [&str], case_mode: CaseMatchMode) -> Self

Source

pub fn and_is_not( &mut self, patterns: &'a [&str], case_mode: CaseMatchMode, ) -> Self

Source

pub fn and_is_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_is_not_ci(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_is_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_is_not_cs(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_is_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Source

pub fn and_is_not_ci_alphanum(&mut self, patterns: &'a [&str]) -> Self

Trait Implementations§

Source§

impl<'a> Clone for BoundsBuilder<'a>

Source§

fn clone(&self) -> BoundsBuilder<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for BoundsBuilder<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for BoundsBuilder<'a>

§

impl<'a> RefUnwindSafe for BoundsBuilder<'a>

§

impl<'a> Send for BoundsBuilder<'a>

§

impl<'a> Sync for BoundsBuilder<'a>

§

impl<'a> Unpin for BoundsBuilder<'a>

§

impl<'a> UnwindSafe for BoundsBuilder<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.