[]Enum matrix_sdk_base::push::PushCondition

#[non_exhaustive]pub enum PushCondition {
    EventMatch {
        key: String,
        pattern: String,
    },
    ContainsDisplayName,
    RoomMemberCount {
        is: RoomMemberCountIs,
    },
    SenderNotificationPermission {
        key: String,
    },
}

A condition that must apply for an associated push rule's action to be taken.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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.

pattern: String

The glob-style pattern to match against.

Patterns with no special glob characters should be treated as having asterisks prepended and appended when testing the condition.

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

The condition on the current number of members in the room.

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

The field in the power level event the user needs a minimum power level for.

Fields must be specified under the notifications property in the power level event's content.

Trait Implementations

impl Clone for PushCondition

impl Debug for PushCondition

impl<'de> Deserialize<'de> for PushCondition

impl Serialize for PushCondition

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsyncTraitDeps for T where
    T: Send + Sync + Debug
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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>,