pub struct SimpleFilter { /* private fields */ }
Expand description

Convenient struct for implementing a simple filter, ie a struct that generates the content of a simple WHERE a = value clause

Implementations§

source§

impl SimpleFilter

source

pub fn and(self, next: Box<dyn Selectable>) -> SimpleFilter

Trait Implementations§

source§

impl Selectable for SimpleFilter

source§

fn filter(&self) -> Option<String>

Output filter statement - which will be appended to the WHERE clause - such as: Read more
source§

fn limit(&self) -> Option<usize>

Output limit statement - which will be appended to the LIMIT clause - such as: Read more
source§

fn offset(&self) -> Option<usize>

Output offset statement - which will be appended to the OFFSET clause - such as: Read more
source§

fn statement(&self) -> String

source§

impl TryFrom<(&str, &str)> for SimpleFilter

§

type Error = Box<dyn Error>

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

fn try_from((key, value): (&str, &str)) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<(&str, u32)> for SimpleFilter

§

type Error = Box<dyn Error>

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

fn try_from((key, value): (&str, u32)) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<()> for SimpleFilter

§

type Error = Box<dyn Error>

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

fn try_from(_: ()) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<(String, String)> for SimpleFilter

§

type Error = Box<dyn Error>

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

fn try_from((key, value): (String, String)) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.