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

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,
}
Expand description

Filters to be applied to room events.

Fields

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 new 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]

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

Check whether self is empty.

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

fn clone(&self) -> RoomEventFilter<'a>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

fn default() -> RoomEventFilter<'a>[src]

Returns the “default value” for a type. Read more

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

type Incoming = IncomingRoomEventFilter

The ‘Incoming’ variant of Self.

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

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.