#[non_exhaustive]pub struct FilterDefinition {
pub event_fields: Option<Vec<String>>,
pub event_format: EventFormat,
pub presence: Filter,
pub account_data: Filter,
pub room: RoomFilter,
}
Expand description
A filter definition
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.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 ‘.’ characters to indicate sub-fields. So [‘content.body’] will include the ‘body’ field of the ‘content’ object. A literal ‘.’ or ’' character in a field name may be escaped using a ’'. A server may include more fields than were requested.
event_format: 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’.
presence: Filter
The presence updates to include.
account_data: Filter
The user account data that isn’t associated with rooms to include.
room: RoomFilter
Filters to be applied to room data.
Implementations§
Source§impl FilterDefinition
impl FilterDefinition
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates an empty FilterDefinition
.
You can also use the Default
implementation.
Sourcepub fn ignore_all() -> Self
pub fn ignore_all() -> Self
Creates a new FilterDefinition
that can be used to ignore all events.
Sourcepub fn with_lazy_loading() -> Self
pub fn with_lazy_loading() -> Self
Creates a new FilterDefinition
with room member lazy-loading enabled.
Redundant membership events are disabled.
Trait Implementations§
Source§impl CanBeEmpty for FilterDefinition
impl CanBeEmpty for FilterDefinition
Source§impl Clone for FilterDefinition
impl Clone for FilterDefinition
Source§fn clone(&self) -> FilterDefinition
fn clone(&self) -> FilterDefinition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more