1use wire_e2e_identity::prelude::IdentityStatus;
23/// Indicates the standalone status of a device Credential in a MLS group at a moment T.
4/// This does not represent the states where a device is not using MLS or is not using end-to-end identity
5#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, serde::Serialize, serde::Deserialize)]
6#[repr(u8)]
7pub enum DeviceStatus {
8/// All is fine
9Valid = 1,
10/// The Credential's certificate is expired
11Expired = 2,
12/// The Credential's certificate is revoked
13Revoked = 3,
14}
1516impl From<IdentityStatus> for DeviceStatus {
17fn from(status: IdentityStatus) -> Self {
18match status {
19 IdentityStatus::Valid => Self::Valid,
20 IdentityStatus::Expired => Self::Expired,
21 IdentityStatus::Revoked => Self::Revoked,
22 }
23 }
24}