fn redacted_accessor_methods(
    kind: &EventKind,
    var: &EventKindVariation,
    variants: &[EventEnumVariant],
    ruma_events: &TokenStream,
) -> Option<TokenStream> {
    let ident = kind.to_event_enum_ident(var)?;
    let methods = EVENT_FIELDS.iter().map(|(name, has_field)| {
        generate_accessor(name, kind, var, *has_field, variants, ruma_events)
    });

    Some(quote! {
        #[automatically_derived]
        impl #ident {
            #( #methods )*
        }
    })
}
/// Redacted events do NOT generate `content` or `prev_content` methods like
/// un-redacted events; otherwise, they are the same.
Redacted events do NOT generate `content` or `prev_content` methods like
un-redacted events; otherwise, they are the same.
Redacted events do NOT generate ` content ` or ` prev_content ` methods like un - redacted events ; otherwise they are the same .
fn redacted_accessor_methods(
    kind: &EventKind,
    var: &EventKindVariation,
    variants: &[EventEnumVariant],
    ruma_events: &TokenStream,
) -> Option<TokenStream> {
    let ident = kind.to_event_enum_ident(var)?;
    let methods = EVENT_FIELDS.iter().map(|(name, has_field)| {
        generate_accessor(name, kind, var, *has_field, variants, ruma_events)
    });
    Some(quote! {
        #[automatically_derived]
        impl #ident {
            #( #methods )*
        }
    })
}
fn redacted_accessor_methods ( kind : & EventKind , var : & EventKindVariation , variants : & [ EventEnumVariant ] , ruma_events : & TokenStream , ) -> Option < TokenStream > { let ident = kind . to_event_enum_ident ( var ) ? ; let methods = EVENT_FIELDS . iter ( ) . map ( | ( name , has_field ) | { generate_accessor ( name , kind , var , * has_field , variants , ruma_events ) } ) ; Some ( quote ! { [ automatically_derived ] impl ident { ( methods ) } } ) }
Redacted events do NOT generate `content` or `prev_content` methods like
un-redacted events; otherwise, they are the same.
Redacted events do NOT generate ` content ` or ` prev_content ` methods like un - redacted events ; otherwise they are the same .
kind
&EventKind
var
&EventKindVariation
variants
&[EventEnumVariant]
ruma_events
&TokenStream