Enum ruma_common::push::AnyPushRule [−][src]
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)Expand description
Rules that override all other kinds.
Content(PatternedPushRule)Expand description
Content-specific rules.
Room(SimplePushRule)Expand description
Room-specific rules.
Sender(SimplePushRule)Expand description
Sender-specific rules.
Underride(ConditionalPushRule)Expand description
Lowest priority rules.
Implementations
impl AnyPushRule[src]
impl AnyPushRule[src]pub fn as_ref(&self) -> AnyPushRuleRef<'_>[src]
pub fn as_ref(&self) -> AnyPushRuleRef<'_>[src]Convert AnyPushRule to AnyPushRuleRef.
pub fn applies(
&self,
event: &FlattenedJson,
context: &PushConditionRoomCtx
) -> bool[src]
pub fn applies(
&self,
event: &FlattenedJson,
context: &PushConditionRoomCtx
) -> bool[src]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
impl Clone for AnyPushRule[src]
impl Clone for AnyPushRule[src]fn clone(&self) -> AnyPushRule[src]
fn clone(&self) -> AnyPushRule[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for AnyPushRule[src]
impl Debug for AnyPushRule[src]impl Extend<AnyPushRule> for Ruleset[src]
impl Extend<AnyPushRule> for Ruleset[src]fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = AnyPushRule>, [src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = AnyPushRule>, [src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)[src]
fn extend_one(&mut self, item: A)[src]extend_one)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)[src]
fn extend_reserve(&mut self, additional: usize)[src]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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more