[][src]Struct ruma_common::push::Ruleset

#[non_exhaustive]pub struct Ruleset {
    pub content: Vec<PatternedPushRule>,
    pub override_: Vec<ConditionalPushRule>,
    pub room: Vec<PushRule>,
    pub sender: Vec<PushRule>,
    pub underride: Vec<ConditionalPushRule>,
}

A push ruleset scopes a set of rules according to some criteria.

For example, some rules may only be applied for messages from a particular sender, a particular room, or by default. The push ruleset contains the entire set of scopes and rules.

To create an instance of this type, use its Default implementation and set the fields you need.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
content: Vec<PatternedPushRule>

These rules configure behavior for (unencrypted) messages that match certain patterns.

override_: Vec<ConditionalPushRule>

These user-configured rules are given the highest priority.

This field is named override_ instead of override because the latter is a reserved keyword in Rust.

room: Vec<PushRule>

These rules change the behavior of all messages for a given room.

sender: Vec<PushRule>

These rules configure notification behavior for messages from a specific Matrix user ID.

underride: Vec<ConditionalPushRule>

These rules are identical to override rules, but have a lower priority than content, room and sender rules.

Trait Implementations

impl Clone for Ruleset[src]

impl Debug for Ruleset[src]

impl Default for Ruleset[src]

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

impl Serialize for Ruleset[src]

Auto Trait Implementations

impl RefUnwindSafe for Ruleset

impl Send for Ruleset

impl Sync for Ruleset

impl Unpin for Ruleset

impl UnwindSafe for Ruleset

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: for<'de> 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.