Struct ruma_common::push::SimplePushRule
source · [−]#[non_exhaustive]pub struct SimplePushRule {
pub actions: Vec<Action>,
pub default: bool,
pub enabled: bool,
pub rule_id: String,
}
Expand description
A push rule is a single rule that states under what conditions an event should be passed onto a push gateway and how the notification should be presented.
These rules are stored on the user’s homeserver. They are manually configured by the user, who can create and view them via the Client/Server API.
To create an instance of this type, first create a SimplePushRuleInit
and convert it via
SimplePushRule::from
/ .into()
.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.actions: Vec<Action>
Actions to determine if and how a notification is delivered for events matching this rule.
default: bool
Whether this is a default rule, or has been set explicitly.
enabled: bool
Whether the push rule is enabled or not.
rule_id: String
The ID of this rule.
Trait Implementations
sourceimpl Clone for SimplePushRule
impl Clone for SimplePushRule
sourcefn clone(&self) -> SimplePushRule
fn clone(&self) -> SimplePushRule
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 SimplePushRule
impl Debug for SimplePushRule
sourceimpl<'de> Deserialize<'de> for SimplePushRule
impl<'de> Deserialize<'de> for SimplePushRule
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Equivalent<SimplePushRule> for str
impl Equivalent<SimplePushRule> for str
sourcefn equivalent(&self, key: &SimplePushRule) -> bool
fn equivalent(&self, key: &SimplePushRule) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl From<SimplePushRuleInit> for SimplePushRule
impl From<SimplePushRuleInit> for SimplePushRule
sourcefn from(init: SimplePushRuleInit) -> Self
fn from(init: SimplePushRuleInit) -> Self
Converts to this type from the input type.
sourceimpl Hash for SimplePushRule
impl Hash for SimplePushRule
sourceimpl PartialEq<SimplePushRule> for SimplePushRule
impl PartialEq<SimplePushRule> for SimplePushRule
sourceimpl Serialize for SimplePushRule
impl Serialize for SimplePushRule
impl Eq for SimplePushRule
Auto Trait Implementations
impl RefUnwindSafe for SimplePushRule
impl Send for SimplePushRule
impl Sync for SimplePushRule
impl Unpin for SimplePushRule
impl UnwindSafe for SimplePushRule
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> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
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