Derive Eq and Hash for ID types.
This commit is contained in:
parent
6032f730f8
commit
28fdff9a65
@ -74,7 +74,7 @@ pub enum Error {
|
|||||||
/// "$h29iv0s8:example.com"
|
/// "$h29iv0s8:example.com"
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, Eq, Hash, PartialEq)]
|
||||||
pub struct EventId {
|
pub struct EventId {
|
||||||
hostname: Host,
|
hostname: Host,
|
||||||
opaque_id: String,
|
opaque_id: String,
|
||||||
@ -95,7 +95,7 @@ pub struct EventId {
|
|||||||
/// "#ruma:example.com"
|
/// "#ruma:example.com"
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, Eq, Hash, PartialEq)]
|
||||||
pub struct RoomAliasId {
|
pub struct RoomAliasId {
|
||||||
alias: String,
|
alias: String,
|
||||||
hostname: Host,
|
hostname: Host,
|
||||||
@ -116,7 +116,7 @@ pub struct RoomAliasId {
|
|||||||
/// "!n8f893n9:example.com"
|
/// "!n8f893n9:example.com"
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, Eq, Hash, PartialEq)]
|
||||||
pub struct RoomId {
|
pub struct RoomId {
|
||||||
hostname: Host,
|
hostname: Host,
|
||||||
opaque_id: String,
|
opaque_id: String,
|
||||||
@ -137,7 +137,7 @@ pub struct RoomId {
|
|||||||
/// "@carl:example.com"
|
/// "@carl:example.com"
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, Eq, Hash, PartialEq)]
|
||||||
pub struct UserId {
|
pub struct UserId {
|
||||||
hostname: Host,
|
hostname: Host,
|
||||||
localpart: String,
|
localpart: String,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user