[−][src]Trait rabbithole::operation::Fetching
Associated Types
type Item: SingleEntity + Send + Sync
Required methods
fn fetch_collection<'life0, 'async_trait>(
query: &'life0 Query
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Item>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
query: &'life0 Query
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Item>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Mapping to /<ty>?<query>
fn fetch_single<'life0, 'life1, 'async_trait>(
id: &'life0 str,
query: &'life1 Query
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Item>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
id: &'life0 str,
query: &'life1 Query
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Item>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Mapping to /<ty>/<id>?<query>
fn fetch_relationship<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
id: &'life0 str,
related_field: &'life1 str,
uri: &'life2 str,
query: &'life3 Query,
request_path: &'life4 RawUri
) -> Pin<Box<dyn Future<Output = Result<Relationship, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
id: &'life0 str,
related_field: &'life1 str,
uri: &'life2 str,
query: &'life3 Query,
request_path: &'life4 RawUri
) -> Pin<Box<dyn Future<Output = Result<Relationship, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Mapping to /<ty>/<id>/relationships/<related_field>?<query>
fn fetch_related<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
id: &'life0 str,
related_field: &'life1 str,
uri: &'life2 str,
query: &'life3 Query,
request_path: &'life4 RawUri
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
id: &'life0 str,
related_field: &'life1 str,
uri: &'life2 str,
query: &'life3 Query,
request_path: &'life4 RawUri
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Mapping to /<ty>/<id>/<related_field>?<query>
Provided methods
fn vec_to_document<'life0, 'life1, 'life2, 'life3, 'async_trait>(
items: &'life0 [Self::Item],
uri: &'life1 str,
query: &'life2 Query,
request_path: &'life3 RawUri
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: Send + 'async_trait,
items: &'life0 [Self::Item],
uri: &'life1 str,
query: &'life2 Query,
request_path: &'life3 RawUri
) -> Pin<Box<dyn Future<Output = Result<Document, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: Send + 'async_trait,
User defined vec_to_document
function
NOTICE:
- If using Page Query, it's recommended to:
- put
prev
,next
,first
andlast
intolinks
- put
totalPages
if@type == PageBased
- put