pub fn to_kind_variation(ident: &Ident) -> Option<(EventKind, EventKindVariation)> {
    let ident_str = ident.to_string();
    match ident_str.as_str() {
        "GlobalAccountDataEvent" => Some((EventKind::GlobalAccountData, EventKindVariation::Full)),
        "RoomAccountDataEvent" => Some((EventKind::RoomAccountData, EventKindVariation::Full)),
        "EphemeralRoomEvent" => Some((EventKind::Ephemeral, EventKindVariation::Full)),
        "SyncEphemeralRoomEvent" => Some((EventKind::Ephemeral, EventKindVariation::Sync)),
        "MessageEvent" => Some((EventKind::Message, EventKindVariation::Full)),
        "SyncMessageEvent" => Some((EventKind::Message, EventKindVariation::Sync)),
        "RedactedMessageEvent" => Some((EventKind::Message, EventKindVariation::Redacted)),
        "RedactedSyncMessageEvent" => Some((EventKind::Message, EventKindVariation::RedactedSync)),
        "StateEvent" => Some((EventKind::State, EventKindVariation::Full)),
        "SyncStateEvent" => Some((EventKind::State, EventKindVariation::Sync)),
        "StrippedStateEvent" => Some((EventKind::State, EventKindVariation::Stripped)),
        "InitialStateEvent" => Some((EventKind::State, EventKindVariation::Initial)),
        "RedactedStateEvent" => Some((EventKind::State, EventKindVariation::Redacted)),
        "RedactedSyncStateEvent" => Some((EventKind::State, EventKindVariation::RedactedSync)),
        "RedactedStrippedStateEvent" => {
            Some((EventKind::State, EventKindVariation::RedactedStripped))
        }
        "ToDeviceEvent" => Some((EventKind::ToDevice, EventKindVariation::Full)),
        "PresenceEvent" => Some((EventKind::Presence, EventKindVariation::Full)),
        "RedactionEvent" => Some((EventKind::Redaction, EventKindVariation::Full)),
        "SyncRedactionEvent" => Some((EventKind::Redaction, EventKindVariation::Sync)),
        "DecryptedOlmV1Event" | "DecryptedMegolmV1Event" => {
            Some((EventKind::Decrypted, EventKindVariation::Full))
        }
        _ => None,
    }
}
// This function is only used in the `Event` derive macro expansion code.
/// Validates the given `ident` is a valid event struct name and returns a tuple of enums
/// representing the name.
This function is only used in the `Event` derive macro expansion code.
Validates the given `ident` is a valid event struct name and returns a tuple of enums
representing the name.
This function is only used in the ` Event ` derive macro expansion code . Validates the given ` ident ` is a valid event struct name and returns a tuple of enums representing the name .
pub fn to_kind_variation(ident: &Ident) -> Option<(EventKind, EventKindVariation)> {
    let ident_str = ident.to_string();
    match ident_str.as_str() {
        "GlobalAccountDataEvent" => Some((EventKind::GlobalAccountData, EventKindVariation::Full)),
        "RoomAccountDataEvent" => Some((EventKind::RoomAccountData, EventKindVariation::Full)),
        "EphemeralRoomEvent" => Some((EventKind::Ephemeral, EventKindVariation::Full)),
        "SyncEphemeralRoomEvent" => Some((EventKind::Ephemeral, EventKindVariation::Sync)),
        "MessageEvent" => Some((EventKind::Message, EventKindVariation::Full)),
        "SyncMessageEvent" => Some((EventKind::Message, EventKindVariation::Sync)),
        "RedactedMessageEvent" => Some((EventKind::Message, EventKindVariation::Redacted)),
        "RedactedSyncMessageEvent" => Some((EventKind::Message, EventKindVariation::RedactedSync)),
        "StateEvent" => Some((EventKind::State, EventKindVariation::Full)),
        "SyncStateEvent" => Some((EventKind::State, EventKindVariation::Sync)),
        "StrippedStateEvent" => Some((EventKind::State, EventKindVariation::Stripped)),
        "InitialStateEvent" => Some((EventKind::State, EventKindVariation::Initial)),
        "RedactedStateEvent" => Some((EventKind::State, EventKindVariation::Redacted)),
        "RedactedSyncStateEvent" => Some((EventKind::State, EventKindVariation::RedactedSync)),
        "RedactedStrippedStateEvent" => {
            Some((EventKind::State, EventKindVariation::RedactedStripped))
        }
        "ToDeviceEvent" => Some((EventKind::ToDevice, EventKindVariation::Full)),
        "PresenceEvent" => Some((EventKind::Presence, EventKindVariation::Full)),
        "RedactionEvent" => Some((EventKind::Redaction, EventKindVariation::Full)),
        "SyncRedactionEvent" => Some((EventKind::Redaction, EventKindVariation::Sync)),
        "DecryptedOlmV1Event" | "DecryptedMegolmV1Event" => {
            Some((EventKind::Decrypted, EventKindVariation::Full))
        }
        _ => None,
    }
}
pub fn to_kind_variation ( ident : & Ident ) -> Option < ( EventKind , EventKindVariation ) > { let ident_str = ident . to_string ( ) ; match ident_str . as_str ( ) { " " => Some ( ( EventKind :: GlobalAccountData , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: RoomAccountData , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: Ephemeral , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: Ephemeral , EventKindVariation :: Sync ) ) , " " => Some ( ( EventKind :: Message , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: Message , EventKindVariation :: Sync ) ) , " " => Some ( ( EventKind :: Message , EventKindVariation :: Redacted ) ) , " " => Some ( ( EventKind :: Message , EventKindVariation :: RedactedSync ) ) , " " => Some ( ( EventKind :: State , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: State , EventKindVariation :: Sync ) ) , " " => Some ( ( EventKind :: State , EventKindVariation :: Stripped ) ) , " " => Some ( ( EventKind :: State , EventKindVariation :: Initial ) ) , " " => Some ( ( EventKind :: State , EventKindVariation :: Redacted ) ) , " " => Some ( ( EventKind :: State , EventKindVariation :: RedactedSync ) ) , " " => { Some ( ( EventKind :: State , EventKindVariation :: RedactedStripped ) ) } " " => Some ( ( EventKind :: ToDevice , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: Presence , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: Redaction , EventKindVariation :: Full ) ) , " " => Some ( ( EventKind :: Redaction , EventKindVariation :: Sync ) ) , " " | " " => { Some ( ( EventKind :: Decrypted , EventKindVariation :: Full ) ) } _ => None , } }
This function is only used in the `Event` derive macro expansion code.
This function is only used in the ` Event ` derive macro expansion code .
ident
&Ident