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§
- 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
palpo_core::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. - 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
.