leptos_sync_core/
query.rs1use serde::{Deserialize, Serialize};
4
5pub struct QueryBuilder<T> {
7 _phantom: std::marker::PhantomData<T>,
8}
9
10impl<T> QueryBuilder<T> {
11 pub fn new() -> Self {
12 Self {
13 _phantom: std::marker::PhantomData,
14 }
15 }
16
17 pub fn filter<F>(self, _predicate: F) -> Self
18 where
19 F: Fn(&T) -> bool + 'static,
20 {
21 self
22 }
23
24 pub fn sort_by<F>(self, _comparator: F) -> Self
25 where
26 F: Fn(&T, &T) -> std::cmp::Ordering + 'static,
27 {
28 self
29 }
30
31 pub fn limit(self, _limit: usize) -> Self {
32 self
33 }
34
35 pub fn watch(self) -> Self {
36 self
37 }
38}
39
40impl<T> Default for QueryBuilder<T> {
41 fn default() -> Self {
42 Self::new()
43 }
44}