pub struct SearchService { /* private fields */ }Expand description
Provides paginated access to any entity of your liking by using the PaginatedResult.
Implementations§
Source§impl SearchService
impl SearchService
Sourcepub async fn search<E: for<'r> FromRow<'r, PgRow>, S: SearchCriteria + Send>(
&self,
table_name: &'static str,
search: impl Into<Option<S>>,
pagination: impl Into<Option<PaginationQuery>>,
) -> Result<PaginatedResult<E>>
pub async fn search<E: for<'r> FromRow<'r, PgRow>, S: SearchCriteria + Send>( &self, table_name: &'static str, search: impl Into<Option<S>>, pagination: impl Into<Option<PaginationQuery>>, ) -> Result<PaginatedResult<E>>
Searches for a set of entities using the given criteria.
Trait Implementations§
Source§impl Clone for SearchService
impl Clone for SearchService
Source§impl Debug for SearchService
impl Debug for SearchService
Source§impl<S> FromState<S> for SearchServicewhere
S: ProvideState<Database>,
impl<S> FromState<S> for SearchServicewhere
S: ProvideState<Database>,
fn from_state(state: &S) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SearchService
impl !UnwindSafe for SearchService
impl Freeze for SearchService
impl Send for SearchService
impl Sync for SearchService
impl Unpin for SearchService
impl UnsafeUnpin for SearchService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more