fn expand_any_redacted(
    kind: &EventKind,
    events: &[LitStr],
    attrs: &[Attribute],
    variants: &[EventEnumVariant],
    ruma_events: &TokenStream,
) -> TokenStream {
    use EventKindVariation as V;

    if kind.is_state() {
        let full_state =
            expand_any_with_deser(kind, events, attrs, variants, &V::Redacted, ruma_events);
        let sync_state =
            expand_any_with_deser(kind, events, attrs, variants, &V::RedactedSync, ruma_events);
        let stripped_state =
            expand_any_with_deser(kind, events, attrs, variants, &V::RedactedStripped, ruma_events);

        quote! {
            #full_state

            #sync_state

            #stripped_state
        }
    } else if kind.is_message() {
        let full_message =
            expand_any_with_deser(kind, events, attrs, variants, &V::Redacted, ruma_events);
        let sync_message =
            expand_any_with_deser(kind, events, attrs, variants, &V::RedactedSync, ruma_events);

        quote! {
            #full_message

            #sync_message
        }
    } else {
        TokenStream::new()
    }
}
/// Generates the 3 redacted state enums, 2 redacted message enums,
/// and `Deserialize` implementations.
///
/// No content enums are generated since no part of the API deals with
/// redacted event's content. There are only five state variants that contain content.
Generates the 3 redacted state enums, 2 redacted message enums,
and `Deserialize` implementations.

No content enums are generated since no part of the API deals with
redacted event's content. There are only five state variants that contain content.
Generates the 3 redacted state enums 2 redacted message enums and ` Deserialize ` implementations . No content enums are generated since no part of the API deals with redacted event ' s content . There are only five state variants that contain content .
fn expand_any_redacted(
    kind: &EventKind,
    events: &[LitStr],
    attrs: &[Attribute],
    variants: &[EventEnumVariant],
    ruma_events: &TokenStream,
) -> TokenStream {
    use EventKindVariation as V;
    if kind.is_state() {
        let full_state =
            expand_any_with_deser(kind, events, attrs, variants, &V::Redacted, ruma_events);
        let sync_state =
            expand_any_with_deser(kind, events, attrs, variants, &V::RedactedSync, ruma_events);
        let stripped_state =
            expand_any_with_deser(kind, events, attrs, variants, &V::RedactedStripped, ruma_events);
        quote! {
            #full_state
            #sync_state
            #stripped_state
        }
    } else if kind.is_message() {
        let full_message =
            expand_any_with_deser(kind, events, attrs, variants, &V::Redacted, ruma_events);
        let sync_message =
            expand_any_with_deser(kind, events, attrs, variants, &V::RedactedSync, ruma_events);
        quote! {
            #full_message
            #sync_message
        }
    } else {
        TokenStream::new()
    }
}
fn expand_any_redacted ( kind : & EventKind , events : & [ LitStr ] , attrs : & [ Attribute ] , variants : & [ EventEnumVariant ] , ruma_events : & TokenStream , ) -> TokenStream { use EventKindVariation as V ; if kind . is_state ( ) { let full_state = expand_any_with_deser ( kind , events , attrs , variants , & V :: Redacted , ruma_events ) ; let sync_state = expand_any_with_deser ( kind , events , attrs , variants , & V :: RedactedSync , ruma_events ) ; let stripped_state = expand_any_with_deser ( kind , events , attrs , variants , & V :: RedactedStripped , ruma_events ) ; quote ! { full_state sync_state stripped_state } } else if kind . is_message ( ) { let full_message = expand_any_with_deser ( kind , events , attrs , variants , & V :: Redacted , ruma_events ) ; let sync_message = expand_any_with_deser ( kind , events , attrs , variants , & V :: RedactedSync , ruma_events ) ; quote ! { full_message sync_message } } else { TokenStream :: new ( ) } }
Generates the 3 redacted state enums, 2 redacted message enums,
and `Deserialize` implementations.
Generates the 3 redacted state enums 2 redacted message enums and ` Deserialize ` implementations .
kind
&EventKind
events
&[LitStr]
attrs
&[Attribute]
variants
&[EventEnumVariant]
ruma_events
&TokenStream