Crate palpo_macros

Source
Expand description

Procedural macros used by palpo crates.

See the documentation for the individual macros for usage details.

Macros§

device_key_id
Compile-time checked DeviceKeyId 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_id
Compile-time checked ServerSigningKeyId construction.
user_id
Compile-time checked UserId construction.

Derive Macros§

AsRefStr
Derive the AsRef<str> trait for an enum.
AsStrAsRefStr
Derive the as_str() method using the AsRef<str> implementation of the type.
DebugAsRefStr
Derive the fmt::Debug trait using the AsRef<str> implementation of the type.
DeserializeFromCowStr
Derive the Deserialize trait using the From<Cow<str>> implementation of the type.
DisplayAsRefStr
Derive the fmt::Display trait using the AsRef<str> implementation of the type.
Event
Generates implementations needed to serialize and deserialize Matrix events.
EventContent
Generates an implementation of palpo_core::events::EventContent.
EventEnumFromEvent
Generates From implementations for event enums.
FromString
Derive the From<T: AsRef<str> + Into<Box<str>>> trait for an enum.
IdZst
Generate methods and trait impl’s for ZST identifier type.
OrdAsRefStr
Derive the Ord trait using the AsRef<str> implementation of the type.
PartialEqAsRefStr
Derive the PartialEq trait using the AsRef<str> implementation of the type.
PartialOrdAsRefStr
Derive the PartialOrd trait using the AsRef<str> implementation of the type.
SerializeAsRefStr
Derive the Serialize trait using the AsRef<str> implementation of the type.
StringEnum
Shorthand for the derives AsRefStr, FromString, DisplayAsRefStr, DebugAsRefStr, SerializeAsRefStr and DeserializeFromCowStr.