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
DeviceKeyIdconstruction. - event_
enum - Generates an enum to represent the various Matrix event types.
- event_
id - Compile-time checked
EventIdconstruction. - mxc_uri
- Compile-time checked
MxcUriconstruction. - room_
alias_ id - Compile-time checked
RoomAliasIdconstruction. - room_id
- Compile-time checked
RoomIdconstruction. - room_
version_ id - Compile-time checked
RoomVersionIdconstruction. - server_
name - Compile-time checked
ServerNameconstruction. - server_
signing_ key_ id - Compile-time checked
ServerSigningKeyIdconstruction. - user_id
- Compile-time checked
UserIdconstruction.
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::Debugtrait using theAsRef<str>implementation of the type. - Deserialize
From CowStr - Derive the
Deserializetrait using theFrom<Cow<str>>implementation of the type. - Display
AsRef Str - Derive the
fmt::Displaytrait 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
Fromimplementations 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
Ordtrait using theAsRef<str>implementation of the type. - Partial
EqAs RefStr - Derive the
PartialEqtrait using theAsRef<str>implementation of the type. - Partial
OrdAs RefStr - Derive the
PartialOrdtrait using theAsRef<str>implementation of the type. - Serialize
AsRef Str - Derive the
Serializetrait using theAsRef<str>implementation of the type. - String
Enum - Shorthand for the derives
AsRefStr,FromString,DisplayAsRefStr,DebugAsRefStr,SerializeAsRefStrandDeserializeFromCowStr.