Crate ruma_macros

source ·
Expand description

Procedural macros used by ruma crates.

See the documentation for the individual macros for usage details.

Macros§

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 the AsRef<str> implementation of the type.
  • Derive the fmt::Debug trait using the AsRef<str> implementation of the type.
  • Derive the Deserialize trait using the From<Cow<str>> implementation of the type.
  • Derive the fmt::Display trait using the AsRef<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 the AsRef<str> implementation of the type.
  • Derive the PartialEq trait using the AsRef<str> implementation of the type.
  • Derive the PartialOrd trait using the AsRef<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 the AsRef<str> implementation of the type.
  • Shorthand for the derives AsRefStr, FromString, DisplayAsRefStr, DebugAsRefStr, SerializeAsRefStr and DeserializeFromCowStr.