Jonas Platte f448f6756e
identifiers: Derive PartialEq, Eq, PartialOrd, Ord, Hash for str newtypes
… instead of generating them in our own macro.
2021-11-26 00:40:44 +01:00

11 lines
280 B
Rust

//! Matrix room name.
/// The name of a room.
///
/// It can't exceed 255 bytes or be empty.
#[repr(transparent)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct RoomName(str);
opaque_identifier_validated!(RoomName, ruma_identifiers_validation::room_name::validate);