identifiers: Split opaque_ids module back into device_id, key_name
This commit is contained in:
parent
4ec9f1aa03
commit
5d27a36cb1
@ -1,5 +1,3 @@
|
|||||||
//! Matrix device identifiers.
|
|
||||||
|
|
||||||
#[cfg(feature = "rand")]
|
#[cfg(feature = "rand")]
|
||||||
use crate::generate_localpart;
|
use crate::generate_localpart;
|
||||||
|
|
||||||
@ -20,14 +18,6 @@ impl DeviceId {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opaque_identifier! {
|
|
||||||
/// 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.
|
|
||||||
pub type KeyName;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(all(test, feature = "rand"))]
|
#[cfg(all(test, feature = "rand"))]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::DeviceId;
|
use super::DeviceId;
|
7
crates/ruma-identifiers/src/key_name.rs
Normal file
7
crates/ruma-identifiers/src/key_name.rs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
opaque_identifier! {
|
||||||
|
/// 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.
|
||||||
|
pub type KeyName;
|
||||||
|
}
|
@ -23,11 +23,12 @@ use serde::de::{self, Deserializer, Unexpected};
|
|||||||
pub use crate::{
|
pub use crate::{
|
||||||
client_secret::{ClientSecret, ClientSecretBox},
|
client_secret::{ClientSecret, ClientSecretBox},
|
||||||
crypto_algorithms::{DeviceKeyAlgorithm, EventEncryptionAlgorithm, SigningKeyAlgorithm},
|
crypto_algorithms::{DeviceKeyAlgorithm, EventEncryptionAlgorithm, SigningKeyAlgorithm},
|
||||||
|
device_id::{DeviceId, DeviceIdBox},
|
||||||
device_key_id::DeviceKeyId,
|
device_key_id::DeviceKeyId,
|
||||||
event_id::EventId,
|
event_id::EventId,
|
||||||
key_id::{DeviceSigningKeyId, KeyId, ServerSigningKeyId, SigningKeyId},
|
key_id::{DeviceSigningKeyId, KeyId, ServerSigningKeyId, SigningKeyId},
|
||||||
|
key_name::{KeyName, KeyNameBox},
|
||||||
mxc_uri::MxcUri,
|
mxc_uri::MxcUri,
|
||||||
opaque_ids::{DeviceId, DeviceIdBox, KeyName, KeyNameBox},
|
|
||||||
room_alias_id::RoomAliasId,
|
room_alias_id::RoomAliasId,
|
||||||
room_id::RoomId,
|
room_id::RoomId,
|
||||||
room_id_or_room_alias_id::RoomIdOrAliasId,
|
room_id_or_room_alias_id::RoomIdOrAliasId,
|
||||||
@ -48,11 +49,12 @@ pub mod user_id;
|
|||||||
|
|
||||||
mod client_secret;
|
mod client_secret;
|
||||||
mod crypto_algorithms;
|
mod crypto_algorithms;
|
||||||
|
mod device_id;
|
||||||
mod device_key_id;
|
mod device_key_id;
|
||||||
mod event_id;
|
mod event_id;
|
||||||
mod key_id;
|
mod key_id;
|
||||||
|
mod key_name;
|
||||||
mod mxc_uri;
|
mod mxc_uri;
|
||||||
mod opaque_ids;
|
|
||||||
mod room_alias_id;
|
mod room_alias_id;
|
||||||
mod room_id;
|
mod room_id;
|
||||||
mod room_id_or_room_alias_id;
|
mod room_id_or_room_alias_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user