[][src]Enum ruma_client_api::r0::push::PushCondition

pub enum PushCondition {
    EventMatch {
        key: String,
        pattern: String,
    },
    ContainsDisplayName,
    RoomMemberCount {
        is: String,
    },
    SenderNotificationPermission {
        key: String,
    },
}

A condition for a push rule

Variants

EventMatch

This is a glob pattern match on a field of the event.

Fields of EventMatch

key: String

The dot-separated field of the event to match, e.g. content.body

pattern: String

The glob-style pattern to match against.

ContainsDisplayName

This matches unencrypted messages where content.body contains the owner's display name in that room.

RoomMemberCount

This matches the current number of members in the room.

Fields of RoomMemberCount

is: String

A decimal integer optionally prefixed by one of, ==, <, >, >= or <=. Default prefix is ==.

SenderNotificationPermission

This takes into account the current power levels in the room, ensuring the sender of the event has high enough power to trigger the notification.

Fields of SenderNotificationPermission

key: String

A string that determines the power level the sender must have to trigger notifications of a given type, such as room.

Trait Implementations

impl Clone for PushCondition[src]

impl Debug for PushCondition[src]

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

impl Serialize for PushCondition[src]

Auto Trait Implementations

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: 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,