identifiers: Add owned key id type aliases
This commit is contained in:
parent
6434fd8c92
commit
01e080d0b5
@ -15,7 +15,10 @@ pub use self::{
|
|||||||
device_id::{DeviceId, OwnedDeviceId},
|
device_id::{DeviceId, OwnedDeviceId},
|
||||||
device_key_id::{DeviceKeyId, OwnedDeviceKeyId},
|
device_key_id::{DeviceKeyId, OwnedDeviceKeyId},
|
||||||
event_id::{EventId, OwnedEventId},
|
event_id::{EventId, OwnedEventId},
|
||||||
key_id::{DeviceSigningKeyId, KeyId, ServerSigningKeyId, SigningKeyId},
|
key_id::{
|
||||||
|
DeviceSigningKeyId, KeyId, OwnedDeviceSigningKeyId, OwnedKeyId, OwnedServerSigningKeyId,
|
||||||
|
OwnedSigningKeyId, ServerSigningKeyId, SigningKeyId,
|
||||||
|
},
|
||||||
key_name::{KeyName, OwnedKeyName},
|
key_name::{KeyName, OwnedKeyName},
|
||||||
matrix_uri::{MatrixToUri, MatrixUri},
|
matrix_uri::{MatrixToUri, MatrixUri},
|
||||||
mxc_uri::{MxcUri, OwnedMxcUri},
|
mxc_uri::{MxcUri, OwnedMxcUri},
|
||||||
|
@ -57,12 +57,21 @@ impl<A, K: ?Sized> KeyId<A, K> {
|
|||||||
/// Algorithm + key name for signing keys.
|
/// Algorithm + key name for signing keys.
|
||||||
pub type SigningKeyId<K> = KeyId<SigningKeyAlgorithm, K>;
|
pub type SigningKeyId<K> = KeyId<SigningKeyAlgorithm, K>;
|
||||||
|
|
||||||
|
/// Algorithm + key name for signing keys.
|
||||||
|
pub type OwnedSigningKeyId<K> = OwnedKeyId<SigningKeyAlgorithm, K>;
|
||||||
|
|
||||||
/// Algorithm + key name for homeserver signing keys.
|
/// Algorithm + key name for homeserver signing keys.
|
||||||
pub type ServerSigningKeyId = SigningKeyId<KeyName>;
|
pub type ServerSigningKeyId = SigningKeyId<KeyName>;
|
||||||
|
|
||||||
|
/// Algorithm + key name for homeserver signing keys.
|
||||||
|
pub type OwnedServerSigningKeyId = OwnedSigningKeyId<KeyName>;
|
||||||
|
|
||||||
/// Algorithm + key name for device keys.
|
/// Algorithm + key name for device keys.
|
||||||
pub type DeviceSigningKeyId = SigningKeyId<DeviceId>;
|
pub type DeviceSigningKeyId = SigningKeyId<DeviceId>;
|
||||||
|
|
||||||
|
/// Algorithm + key name for device keys.
|
||||||
|
pub type OwnedDeviceSigningKeyId = OwnedSigningKeyId<DeviceId>;
|
||||||
|
|
||||||
// The following impls are usually derived using the std macros.
|
// The following impls are usually derived using the std macros.
|
||||||
// They are implemented manually here to avoid unnecessary bounds.
|
// They are implemented manually here to avoid unnecessary bounds.
|
||||||
impl<A, K: ?Sized> PartialEq for KeyId<A, K> {
|
impl<A, K: ?Sized> PartialEq for KeyId<A, K> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user