Struct ruma::api::client::r0::filter::FilterDefinition [−][src]
pub struct FilterDefinition<'a> {
pub event_fields: Option<&'a [String]>,
pub event_format: EventFormat,
pub presence: Filter<'a>,
pub account_data: Filter<'a>,
pub room: RoomFilter<'a>,
}
api
and (crate features client-api
or client-api-c
or client-api-s
) only.Expand description
A filter definition
Fields
event_fields: Option<&'a [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 ‘.’ 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<'a>
The presence updates to include.
account_data: Filter<'a>
The user account data that isn’t associated with rooms to include.
room: RoomFilter<'a>
Filters to be applied to room data.
Implementations
Creates an empty FilterDefinition
.
You can also use the Default
implementation.
Creates a new FilterDefinition
that can be used to ignore all events.
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
type Incoming = IncomingFilterDefinition
type Incoming = IncomingFilterDefinition
The ‘Incoming’ variant of Self
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for FilterDefinition<'a>
impl<'a> Send for FilterDefinition<'a>
impl<'a> Sync for FilterDefinition<'a>
impl<'a> Unpin for FilterDefinition<'a>
impl<'a> UnwindSafe for FilterDefinition<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more