ruma_events/policy/rule/
server.rsuse ruma_macros::EventContent;
use serde::{Deserialize, Serialize};
use super::{PolicyRuleEventContent, PossiblyRedactedPolicyRuleEventContent};
use crate::{EventContent, PossiblyRedactedStateEventContent, StateEventType};
#[derive(Clone, Debug, Deserialize, Serialize, EventContent)]
#[allow(clippy::exhaustive_structs)]
#[ruma_event(type = "m.policy.rule.server", kind = State, state_key_type = String, custom_possibly_redacted)]
pub struct PolicyRuleServerEventContent(pub PolicyRuleEventContent);
#[derive(Clone, Debug, Deserialize, Serialize)]
#[allow(clippy::exhaustive_structs)]
pub struct PossiblyRedactedPolicyRuleServerEventContent(pub PossiblyRedactedPolicyRuleEventContent);
impl EventContent for PossiblyRedactedPolicyRuleServerEventContent {
type EventType = StateEventType;
fn event_type(&self) -> Self::EventType {
StateEventType::PolicyRuleServer
}
}
impl PossiblyRedactedStateEventContent for PossiblyRedactedPolicyRuleServerEventContent {
type StateKey = String;
}