[−]Module matrix_sdk::push
Common types for the push notifications module
Understanding the types of this module
Push rules are grouped in RuleSet
s, and are grouped in five kinds (for
more details about the different kind of rules, see the Ruleset
documentation,
or the specification). These five kinds are:
- content rules
- override rules
- underride rules
- room rules
- sender rules
Each of these kind of rule has a corresponding type that is just a wrapper around another type:
SimplePushRule
for room and sender rulesConditionalPushRule
for override and underride rules: push rules that may depend on a conditionPatternedPushRules
for content rules, that can filter events based on a pattern to trigger the rule or not
Having these wrapper types allows to tell at the type level what kind of rule you are
handling, and makes sure the Ruleset::add
method adds your rule to the correct field
of Ruleset
, and that rules that are not of the same kind are never mixed even if they share
the same representation.
It is still possible to write code that is generic over a representation by manipulating
SimplePushRule
, ConditonalPushRule
or PatternedPushRule
directly, instead of the wrappers.
There is also the AnyPushRule
type that is the most generic form of push rule, with all
the possible fields.
Structs
AnyPushRule | Like |
ConditionalPushRule | Like |
ConditionalPushRuleInit | Initial set of fields of |
ContentPushRule | Wrapper type to disambiguate the kind of the wrapped rule |
MissingConditionsError | An error that happens when |
MissingPatternError | An error that happens when |
OverridePushRule | Wrapper type to disambiguate the kind of the wrapped rule |
PatternedPushRule | Like |
PatternedPushRuleInit | Initial set of fields of |
PusherData | Information for the pusher implementation itself. |
RoomMemberCountIs | A decimal integer optionally prefixed by one of |
RoomPushRule | Wrapper type to disambiguate the kind of the wrapped rule |
Ruleset | A push ruleset scopes a set of rules according to some criteria. |
RulesetIter | Iterator type for |
SenderPushRule | Wrapper type to disambiguate the kind of the wrapped rule |
SimplePushRule | 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. |
SimplePushRuleInit | Initial set of fields of |
UnderridePushRule | Wrapper type to disambiguate the kind of the wrapped rule |
Enums
Action | This represents the different actions that should be taken when a rule is matched, and controls how notifications are delivered to the client. |
ComparisonOperator | One of |
PushCondition | A condition that must apply for an associated push rule's action to be taken. |
PushFormat | A special format that the homeserver should use when sending notifications to a Push Gateway. Currently, only "event_id_only" is supported as of Push Gateway API r0.1.1. |
Tweak | The |
Traits
RulesetMember | A trait for types that can be added in a Ruleset |