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

pub struct FilterDefinition {
    pub event_fields: Option<Vec<String>>,
    pub event_format: Option<EventFormat>,
    pub account_data: Option<Filter>,
    pub room: Option<RoomFilter>,
    pub presence: Option<Filter>,
}

A filter definition

Fields

event_fields: Option<Vec<String>>

List of event fields to include.

If this list is absent then all fields are included. The entries may include '.' charaters to indicate sub-fields. So ['content.body'] will include the 'body' field of the 'content' object. A literal '.' character in a field name may be escaped using a ''. A server may include more fields than were requested.

event_format: Option<EventFormat>

The format to use for events.

'client' will return the events in a format suitable for clients. 'federation' will return the raw event as received over federation. The default is 'client'.

account_data: Option<Filter>

The user account data that isn't associated with rooms to include.

room: Option<RoomFilter>

Filters to be applied to room data.

presence: Option<Filter>

The presence updates to include.

Methods

impl FilterDefinition[src]

pub fn ignore_all() -> Self[src]

A filter that can be used to ignore all events

Trait Implementations

impl Clone for FilterDefinition[src]

impl Debug for FilterDefinition[src]

impl Default for FilterDefinition[src]

impl<'de> Deserialize<'de> for FilterDefinition[src]

impl Serialize for FilterDefinition[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,