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

10 lines
291 B
Rust

/// A Matrix key identifier.
///
/// Key identifiers in Matrix are opaque character sequences of `[a-zA-Z_]`. This type is
/// provided simply for its semantic value.
#[repr(transparent)]
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct KeyName(str);
opaque_identifier!(KeyName);