Expand description
Procedural macros used by ruma crates.
See the documentation for the individual macros for usage details.
Macros§
- Compile-time checked
Base64PublicKey
construction. - Generates an enum to represent the various Matrix event types.
- Compile-time checked
EventId
construction. - Compile-time checked
MxcUri
construction. - Compile-time checked
RoomAliasId
construction. - Compile-time checked
RoomId
construction. - Compile-time checked
RoomVersionId
construction. - Compile-time checked
ServerName
construction. - Compile-time checked
ServerSigningKeyVersion
construction. - Compile-time checked
UserId
construction.
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::Debug
trait using theAsRef<str>
implementation of the type. - Derive the
Deserialize
trait using theFrom<Cow<str>>
implementation of the type. - Derive the
fmt::Display
trait using theAsRef<str>
implementation of the type. - Generates implementations needed to serialize and deserialize Matrix events.
- Generates an implementation of
ruma_events::EventContent
. - Generates
From
implementations 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
Ord
trait using theAsRef<str>
implementation of the type. - Derive the
PartialEq
trait using theAsRef<str>
implementation of the type. - Derive the
PartialOrd
trait 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
Serialize
trait using theAsRef<str>
implementation of the type. - Shorthand for the derives
AsRefStr
,FromString
,DisplayAsRefStr
,DebugAsRefStr
,SerializeAsRefStr
andDeserializeFromCowStr
.