wip
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m25s
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m25s
This commit is contained in:
@@ -55,7 +55,21 @@ pub enum SignerKind {
|
||||
#[default]
|
||||
Auto,
|
||||
User,
|
||||
Device,
|
||||
Encryption,
|
||||
}
|
||||
|
||||
impl SignerKind {
|
||||
pub fn auto(&self) -> bool {
|
||||
matches!(self, SignerKind::Auto)
|
||||
}
|
||||
|
||||
pub fn user(&self) -> bool {
|
||||
matches!(self, SignerKind::User)
|
||||
}
|
||||
|
||||
pub fn encryption(&self) -> bool {
|
||||
matches!(self, SignerKind::Encryption)
|
||||
}
|
||||
}
|
||||
|
||||
/// Room configuration
|
||||
@@ -65,6 +79,16 @@ pub struct RoomConfig {
|
||||
signer_kind: SignerKind,
|
||||
}
|
||||
|
||||
impl RoomConfig {
|
||||
pub fn backup(&self) -> bool {
|
||||
self.backup
|
||||
}
|
||||
|
||||
pub fn signer_kind(&self) -> &SignerKind {
|
||||
&self.signer_kind
|
||||
}
|
||||
}
|
||||
|
||||
/// Settings
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Settings {
|
||||
|
||||
Reference in New Issue
Block a user