Expand description
Procedural macros used by ruma crates.
See the documentation for the individual macros for usage details.
Macros§
- Compile-time checked
Base64PublicKeyconstruction. - Generates an enum to represent the various Matrix event types.
- Compile-time checked
EventIdconstruction. - Compile-time checked
MxcUriconstruction. - Compile-time checked
RoomAliasIdconstruction. - Compile-time checked
RoomIdconstruction. - Compile-time checked
RoomVersionIdconstruction. - Compile-time checked
ServerNameconstruction. - Compile-time checked
ServerSigningKeyVersionconstruction. - Compile-time checked
UserIdconstruction.
Attribute Macros§
⚠ If this is the only documentation you see, please navigate to the docs for
ruma_common::api::request, where actual documentation can be found.⚠ If this is the only documentation you see, please navigate to the docs for
ruma_common::api::response, where actual documentation can be found.
Derive Macros§
- Derive the
AsRef<str>trait for an enum. - Derive the
as_str()method using theAsRef<str>implementation of the type. - Derive the
fmt::Debugtrait using theAsRef<str>implementation of the type. - Derive the
Deserializetrait using theFrom<Cow<str>>implementation of the type. - Derive the
fmt::Displaytrait using theAsRef<str>implementation of the type. - Generates implementations needed to serialize and deserialize Matrix events.
- Generates an implementation of
ruma_events::EventContent. - Generates
Fromimplementations for event enums. - Derive the
From<T: AsRef<str> + Into<Box<str>>>trait for an enum. - Generate methods and trait impl’s for ZST identifier type.
- Derive the
Ordtrait using theAsRef<str>implementation of the type. - Derive the
PartialEqtrait using theAsRef<str>implementation of the type. - Derive the
PartialOrdtrait using theAsRef<str>implementation of the type. - Internal helper that the request macro delegates most of its work to.
- Internal helper that the response macro delegates most of its work to.
- Derive the
Serializetrait using theAsRef<str>implementation of the type. - Shorthand for the derives
AsRefStr,FromString,DisplayAsRefStr,DebugAsRefStr,SerializeAsRefStrandDeserializeFromCowStr.