Struct matrix_sdk::ruma::api::client::filter::FilterDefinition
source · #[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,
}
api
and (crate features client
or server
) only.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() -> FilterDefinition
pub fn empty() -> FilterDefinition
Creates an empty FilterDefinition
.
You can also use the Default
implementation.
sourcepub fn ignore_all() -> FilterDefinition
pub fn ignore_all() -> FilterDefinition
Creates a new FilterDefinition
that can be used to ignore all events.
sourcepub fn with_lazy_loading() -> FilterDefinition
pub fn with_lazy_loading() -> FilterDefinition
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 moresource§impl Debug for FilterDefinition
impl Debug for FilterDefinition
source§impl Default for FilterDefinition
impl Default for FilterDefinition
source§fn default() -> FilterDefinition
fn default() -> FilterDefinition
source§impl<'de> Deserialize<'de> for FilterDefinition
impl<'de> Deserialize<'de> for FilterDefinition
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FilterDefinition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FilterDefinition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl From<FilterDefinition> for Filter
impl From<FilterDefinition> for Filter
source§fn from(def: FilterDefinition) -> Filter
fn from(def: FilterDefinition) -> Filter
source§impl Serialize for FilterDefinition
impl Serialize for FilterDefinition
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for FilterDefinition
impl RefUnwindSafe for FilterDefinition
impl Send for FilterDefinition
impl Sync for FilterDefinition
impl Unpin for FilterDefinition
impl UnwindSafe for FilterDefinition
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more