15 lines
379 B
Rust
Raw Normal View History

use proc_macro2::Ident;
2024-08-19 19:40:14 +02:00
use quote::quote;
use syn::Type;
2024-08-19 19:40:14 +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! {
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
}
}