Skip to main content

trim_event_fields

Function trim_event_fields 

Source
pub fn trim_event_fields<T>(
    raw: Raw<T>,
    event_fields: Option<&[String]>,
) -> Raw<T>
Expand description

Restrict a serialized event to the requested event_fields per MSC3980, returning it unchanged when no filter is set so the common sync pays nothing.

The deserialize and reserialize happen only when event_fields is Some.