xmtp_api_d14n/queries/
combinators.rs1use xmtp_proto::{api::Endpoint, api_client::Paged, types::TopicCursor};
4
5use crate::protocol::{CursorStore, ResolveDependencies};
6
7mod ordered_query;
8
9pub trait D14nCombinatorExt<S>: Endpoint<S> {
10 fn ordered<R, Store>(
11 self,
12 resolver: R,
13 topic_cursor: TopicCursor,
14 store: Store,
15 ) -> ordered_query::OrderedQuery<Self, R, <Self as Endpoint<S>>::Output, Store>
16 where
17 Self: Sized + Endpoint<S>,
18 <Self as Endpoint<S>>::Output: Paged,
19 R: ResolveDependencies,
20 Store: CursorStore,
21 {
22 ordered_query::ordered(self, resolver, topic_cursor, store)
23 }
24}
25
26impl<S, E> D14nCombinatorExt<S> for E where E: Endpoint<S> {}