sea-orm/sea-orm-macros/src/derives/active_model_behavior.rs
Charles Chege 497bdbe3dd Document the macros.
Add code examples for the macros
2021-10-28 15:46:38 +03:00

12 lines
386 B
Rust

use proc_macro2::{Ident, TokenStream};
use quote::quote;
use syn::Data;
/// Method to derive an implementation of [ActiveModelBehavior](sea_orm::ActiveModelBehavior)
pub fn expand_derive_active_model_behavior(_ident: Ident, _data: Data) -> syn::Result<TokenStream> {
Ok(quote!(
#[automatically_derived]
impl sea_orm::ActiveModelBehavior for ActiveModel {}
))
}