firebae-derive
Derive macros for firebae-cm.
You normally do not depend on this crate directly — firebae-cm re-exports
everything here.
AsFirebaseMap
FCM data, headers and payload fields are map<string, string>. This macro
implements IntoFirebaseMap for a struct with named fields, stringifying each field:
use ;
let data = MessageData ;
let body = new
.data
.expect;
Any type implementing Display can be used as a field value. Option<T> fields are
skipped when None rather than serialized as a placeholder.
The generated code resolves firebae-cm through proc-macro-crate, so renaming the
dependency in your Cargo.toml is supported.
License
MIT