Enum ruma::push::AnyPushRule
source · [−]pub enum AnyPushRule {
Override(ConditionalPushRule),
Content(PatternedPushRule),
Room(SimplePushRule),
Sender(SimplePushRule),
Underride(ConditionalPushRule),
}
Expand description
The kinds of push rules that are available.
Variants
Override(ConditionalPushRule)
Rules that override all other kinds.
Content(PatternedPushRule)
Content-specific rules.
Room(SimplePushRule)
Room-specific rules.
Sender(SimplePushRule)
Sender-specific rules.
Underride(ConditionalPushRule)
Lowest priority rules.
Implementations
sourceimpl AnyPushRule
impl AnyPushRule
sourcepub fn as_ref(&self) -> AnyPushRuleRef<'_>
pub fn as_ref(&self) -> AnyPushRuleRef<'_>
Convert AnyPushRule
to AnyPushRuleRef
.
sourcepub fn applies(
&self,
event: &FlattenedJson,
context: &PushConditionRoomCtx
) -> bool
pub fn applies(
&self,
event: &FlattenedJson,
context: &PushConditionRoomCtx
) -> bool
Check if the push rule applies to the event.
Arguments
event
- The flattened JSON representation of a room message event.context
- The context of the room at the time of the event.
Trait Implementations
sourceimpl Clone for AnyPushRule
impl Clone for AnyPushRule
sourcefn clone(&self) -> AnyPushRule
fn clone(&self) -> AnyPushRule
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AnyPushRule
impl Debug for AnyPushRule
sourceimpl Extend<AnyPushRule> for Ruleset
impl Extend<AnyPushRule> for Ruleset
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = AnyPushRule>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = AnyPushRule>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations
impl RefUnwindSafe for AnyPushRule
impl Send for AnyPushRule
impl Sync for AnyPushRule
impl Unpin for AnyPushRule
impl UnwindSafe for AnyPushRule
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more