Expand description
Procedural macros used by ruma crates.
See the documentation for the individual macros for usage details.
Macros§
- base64_
public_ key - Compile-time checked
Base64PublicKeyconstruction. - event_
enum - Generates enums to represent the various Matrix event types.
- event_
id - Compile-time checked
EventIdconstruction. - mxc_uri
- Compile-time checked
MxcUriconstruction. - room_
alias_ id - Compile-time checked
RoomAliasIdconstruction. - room_id
- Compile-time checked
RoomIdconstruction. - room_
version_ id - Compile-time checked
RoomVersionIdconstruction. - server_
name - Compile-time checked
ServerNameconstruction. - server_
signing_ key_ version - Compile-time checked
ServerSigningKeyVersionconstruction. - user_id
- Compile-time checked
UserIdconstruction.
Attribute Macros§
- request
⚠ If this is the only documentation you see, please navigate to the docs for
ruma_common::api::request, where actual documentation can be found.- response
⚠ 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§
- AsRef
Str - Derive the
AsRef<str>trait for an enum. - AsStr
AsRef Str - Derive the
as_str()method using theAsRef<str>implementation of the type. - Debug
AsRef Str - Derive the
fmt::Debugtrait using theAsRef<str>implementation of the type. - Deserialize
From CowStr - Derive the
Deserializetrait using theFrom<Cow<str>>implementation of the type. - Display
AsRef Str - Derive the
fmt::Displaytrait using theAsRef<str>implementation of the type. - EqAs
RefStr - Derive the
PartialEqandEqtraits using theAsRef<str>implementation of the type. - Event
- Generates trait implementations for Matrix event types.
- Event
Content - Generates traits implementations and types for an event content.
- Event
Enum From Event - Generates
Fromimplementations for an enum for all its variants. - From
String - Derive the
From<T: AsRef<str> + Into<Box<str>>>trait for an enum. - IdDst
- Generate methods and trait impl’s for DST identifier type.
- OrdAs
RefStr - Derive the
OrdandPartialOrdtraits using theAsRef<str>implementation of the type. - Request
- Internal helper that the request macro delegates most of its work to.
- Response
- Internal helper that the response macro delegates most of its work to.
- Serialize
AsRef Str - Derive the
Serializetrait using theAsRef<str>implementation of the type. - String
Enum - Shorthand for the derives
AsRefStr,FromString,DisplayAsRefStr,DebugAsRefStr,SerializeAsRefStr,DeserializeFromCowStr,EqAsRefStrandOrdAsRefStr.