2024-08-24 19:29:54 +02:00
|
|
|
use proc_macro2::Ident;
|
2024-08-19 19:40:14 +02:00
|
|
|
use quote::quote;
|
2024-08-24 19:29:54 +02:00
|
|
|
use syn::Type;
|
2024-08-19 19:40:14 +02:00
|
|
|
|
2024-08-24 19:29:54 +02:00
|
|
|
pub(crate) struct PrimaryKey {
|
|
|
|
pub ident: Ident,
|
|
|
|
pub ty: Type,
|
2024-08-19 19:40:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pub(crate) fn return_type(output: proc_macro2::TokenStream) -> proc_macro2::TokenStream {
|
|
|
|
quote! {
|
2024-08-25 17:56:56 +02:00
|
|
|
std::pin::Pin<Box<dyn core::future::Future<Output = Result<#output, lib::diesel_crud_trait::CrudError>> + Send + 'async_trait>>
|
2024-08-19 19:40:14 +02:00
|
|
|
}
|
|
|
|
}
|