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
Base64PublicKey
construction. - event_
enum - Generates an enum to represent the various Matrix event types.
- event_
id - Compile-time checked
EventId
construction. - mxc_uri
- Compile-time checked
MxcUri
construction. - room_
alias_ id - Compile-time checked
RoomAliasId
construction. - room_id
- Compile-time checked
RoomId
construction. - room_
version_ id - Compile-time checked
RoomVersionId
construction. - server_
name - Compile-time checked
ServerName
construction. - server_
signing_ key_ version - Compile-time checked
ServerSigningKeyVersion
construction. - user_id
- Compile-time checked
UserId
construction.
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::Debug
trait using theAsRef<str>
implementation of the type. - Deserialize
From CowStr - Derive the
Deserialize
trait using theFrom<Cow<str>>
implementation of the type. - Display
AsRef Str - Derive the
fmt::Display
trait using theAsRef<str>
implementation of the type. - Event
- Generates implementations needed to serialize and deserialize Matrix events.
- Event
Content - Generates an implementation of
ruma_events::EventContent
. - Event
Enum From Event - Generates
From
implementations for event enums. - From
String - Derive the
From<T: AsRef<str> + Into<Box<str>>>
trait for an enum. - IdZst
- Generate methods and trait impl’s for ZST identifier type.
- OrdAs
RefStr - Derive the
Ord
trait using theAsRef<str>
implementation of the type. - Partial
EqAs RefStr - Derive the
PartialEq
trait using theAsRef<str>
implementation of the type. - Partial
OrdAs RefStr - Derive the
PartialOrd
trait 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
Serialize
trait using theAsRef<str>
implementation of the type. - String
Enum - Shorthand for the derives
AsRefStr
,FromString
,DisplayAsRefStr
,DebugAsRefStr
,SerializeAsRefStr
andDeserializeFromCowStr
.