Skip to main content

Module filter

Module filter 

Source

Re-exportsยง

use std::mem::take; ๐Ÿ”’
use ruma::RoomId; ๐Ÿ”’
use ruma::UserId; ๐Ÿ”’
use ruma::api::client::filter::Filter; ๐Ÿ”’
use ruma::api::client::filter::RoomEventFilter; ๐Ÿ”’
use ruma::api::client::filter::RoomFilter; ๐Ÿ”’
use ruma::api::client::filter::UrlFilter; ๐Ÿ”’
use ruma::serde::Raw; ๐Ÿ”’
use serde_json::Map; ๐Ÿ”’
use serde_json::Value; ๐Ÿ”’
use smallvec::SmallVec; ๐Ÿ”’
use tuwunel_core::is_equal_to; ๐Ÿ”’
use super::Event; ๐Ÿ”’

Traitsยง

Matches
Tests values against a Matrix filter.

Functionsยง

copy_field_path ๐Ÿ”’
Copy the leaf or subtree at segments from source into the same nested path in out, creating intermediate objects as needed; an absent or non-object path is skipped.
matches_room ๐Ÿ”’
matches_room_id ๐Ÿ”’
matches_sender ๐Ÿ”’
matches_type ๐Ÿ”’
matches_url ๐Ÿ”’
matches_user_id ๐Ÿ”’
split_field ๐Ÿ”’
Split one event_fields entry into its segments, inverting the MSC3873 escape grammar used by rumaโ€™s escape_key: \. is a literal dot inside the current segment, \\ a literal backslash, any other \X is kept verbatim, and an unescaped . ends the segment.
trim_event_fields
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.

Type Aliasesยง

FieldPath ๐Ÿ”’
Segments of one event_fields entry; most paths are one or two deep.