Struct ruma_client_api::filter::FilterDefinition
source · pub struct FilterDefinition {
pub event_fields: Option<Vec<String>>,
pub event_format: EventFormat,
pub presence: Filter,
pub account_data: Filter,
pub room: RoomFilter,
}client or server only.Expand description
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 ‘.’ 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: EventFormatThe 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: FilterThe presence updates to include.
account_data: FilterThe user account data that isn’t associated with rooms to include.
room: RoomFilterFilters 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