Enum ruma_common::push::AnyPushRule
source · [−]#[non_exhaustive]
pub enum AnyPushRule {
Override(ConditionalPushRule),
Content(PatternedPushRule),
Room(SimplePushRule),
Sender(SimplePushRule),
Underride(ConditionalPushRule),
}
Expand description
The kinds of push rules that are available.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
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 more
sourceimpl 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)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more