Predicate

Struct Predicate 

Source
pub struct Predicate { /* private fields */ }
Expand description

Predicate to decide whether a specific row qualifies a query or not

Implementations§

Source§

impl Predicate

Source

pub fn build() -> Self

Create empty predicate

Source

pub fn separator(self, separator: Separator) -> Self

Source

pub fn column(self, column: &str) -> Self

Source

pub fn operator(self, op: Operator) -> Self

Source

pub fn matcher(self, pattern: &str) -> CIndexResult<Self>

Create regex matcher from regex pattern

Source

pub fn raw_args(self, args: &str) -> Self

Append raw args ( String )

Source

pub fn args(self, args: Vec<impl AsRef<str>>) -> Self

Source

pub fn new(column: &str, operation: Operator) -> Self

Source

pub fn set_matcher(&mut self, pattern: &str) -> CIndexResult<()>

Source

pub fn set_separator(&mut self, separator: Separator)

Source

pub fn set_column(&mut self, column: &str)

Source

pub fn set_operator(&mut self, op: Operator)

Source

pub fn set_args(&mut self, args: Vec<String>)

Source

pub fn add_arg(&mut self, arg: &str)

Trait Implementations§

Source§

impl Debug for Predicate

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.