Add a constructor for SecretStorageDefaultKeyEventContent

This commit is contained in:
Damir Jelić 2023-09-26 18:16:02 +02:00
parent 50d28aefbd
commit 51d104c56c

View File

@ -15,3 +15,13 @@ pub struct SecretStorageDefaultKeyEventContent {
#[serde(rename = "key")]
pub key_id: String,
}
impl SecretStorageDefaultKeyEventContent {
/// Create a new [`SecretStorageDefaultKeyEventContent`] with the given key ID.
///
/// Uploading this to the account data will mark the secret storage key with the given key ID as
/// the default key.
pub fn new(key_id: String) -> Self {
Self { key_id }
}
}