File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
crates/bevy_asset/macros/src Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
- #![ expect( missing_docs, reason = "Not all docs are written yet, see #3492." ) ]
2
1
#![ cfg_attr( docsrs, feature( doc_auto_cfg) ) ]
3
2
3
+ //! Macros for deriving asset traits.
4
+
4
5
use bevy_macro_utils:: BevyManifest ;
5
6
use proc_macro:: { Span , TokenStream } ;
6
7
use quote:: { format_ident, quote} ;
@@ -12,6 +13,7 @@ pub(crate) fn bevy_asset_path() -> Path {
12
13
13
14
const DEPENDENCY_ATTRIBUTE : & str = "dependency" ;
14
15
16
+ /// Implement the `Asset` trait.
15
17
#[ proc_macro_derive( Asset , attributes( dependency) ) ]
16
18
pub fn derive_asset ( input : TokenStream ) -> TokenStream {
17
19
let ast = parse_macro_input ! ( input as DeriveInput ) ;
@@ -30,6 +32,7 @@ pub fn derive_asset(input: TokenStream) -> TokenStream {
30
32
} )
31
33
}
32
34
35
+ /// Implement the `VisitAssetDependencies` trait.
33
36
#[ proc_macro_derive( VisitAssetDependencies , attributes( dependency) ) ]
34
37
pub fn derive_asset_dependency_visitor ( input : TokenStream ) -> TokenStream {
35
38
let ast = parse_macro_input ! ( input as DeriveInput ) ;
You can’t perform that action at this time.
0 commit comments