Struct ruma_client_api::r0::filter::RoomEventFilter[][src]

#[non_exhaustive]
pub struct RoomEventFilter<'a> { pub not_types: &'a [String], pub not_rooms: &'a [String], pub limit: Option<UInt>, pub rooms: Option<&'a [RoomId]>, pub not_senders: &'a [UserId], pub senders: Option<&'a [UserId]>, pub types: Option<&'a [String]>, pub url_filter: Option<UrlFilter>, pub lazy_load_options: LazyLoadOptions, }

Filters to be applied to room events.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
not_types: &'a [String]

A list of event types to exclude.

If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ‘types’ filter. A ‘*’ can be used as a wildcard to match any sequence of characters.

not_rooms: &'a [String]

A list of room IDs to exclude.

If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ‘rooms’ filter.

limit: Option<UInt>

The maximum number of events to return.

rooms: Option<&'a [RoomId]>

A list of room IDs to include.

If this list is absent then all rooms are included.

not_senders: &'a [UserId]

A list of sender IDs to exclude.

If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ‘senders’ filter.

senders: Option<&'a [UserId]>

A list of senders IDs to include.

If this list is absent then all senders are included.

types: Option<&'a [String]>

A list of event types to include.

If this list is absent then all event types are included. A ‘*’ can be used as a wildcard to match any sequence of characters.

url_filter: Option<UrlFilter>

Controls whether to include events with a URL key in their content.

  • None: No filtering
  • Some(EventsWithUrl): Only events with a URL
  • Some(EventsWithoutUrl): Only events without a URL
lazy_load_options: LazyLoadOptions

Options to control lazy-loading of membership events.

Defaults to LazyLoadOptions::Disabled.

Implementations

impl<'a> RoomEventFilter<'a>[src]

pub fn empty() -> Self[src]

Creates an empty RoomEventFilter.

You can also use the Default implementation.

pub fn ignore_all() -> Self[src]

Creates a RoomEventFilter that can be used to ignore all room events.

pub fn is_empty(&self) -> bool[src]

Returns true if all fields are empty.

Trait Implementations

impl<'a> CanBeEmpty for RoomEventFilter<'a>[src]

impl<'a> Clone for RoomEventFilter<'a>[src]

impl<'a> Debug for RoomEventFilter<'a>[src]

impl<'a> Default for RoomEventFilter<'a>[src]

impl<'a> Outgoing for RoomEventFilter<'a>[src]

type Incoming = IncomingRoomEventFilter

The ‘Incoming’ variant of Self.

impl<'a> Serialize for RoomEventFilter<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for RoomEventFilter<'a>

impl<'a> Send for RoomEventFilter<'a>

impl<'a> Sync for RoomEventFilter<'a>

impl<'a> Unpin for RoomEventFilter<'a>

impl<'a> UnwindSafe for RoomEventFilter<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.