Skip to main content

Matches

Trait Matches 

Source
pub trait Matches<T> {
    // Required method
    fn matches(&self, t: T) -> bool;
}
Expand description

Tests values against a Matrix filter.

Implementations apply the allow and deny lists relevant to the value being tested. A value matches only when every applicable filter condition accepts it.

Required Methods§

Source

fn matches(&self, t: T) -> bool

Returns whether the supplied value satisfies this filter.

The value type selects which filter fields participate in the comparison. Built-in implementations reject deny-list matches before accepting allow-list matches.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Matches<&RoomId> for RoomFilter

Source§

fn matches(&self, room_id: &RoomId) -> bool

Source§

impl Matches<&UserId> for Filter

Source§

fn matches(&self, user_id: &UserId) -> bool

Source§

impl<E: Event> Matches<&E> for RoomEventFilter

Source§

fn matches(&self, event: &E) -> bool

Implementors§