metadata!() { /* proc-macro */ }
metadata generates the metadata method and should be placed at the very end of the lib.rs file.
metadata
lib.rs