pub struct FilterEventsRequest { /* private fields */ }Implementations§
Source§impl FilterEventsRequest
impl FilterEventsRequest
Sourcepub fn with_filter(self, value: impl Into<Filter>) -> Self
pub fn with_filter(self, value: impl Into<Filter>) -> Self
Specify which event types to allow/disallow
The body (parameter) should specify a JSON key/value object that describes the type of event filtering needed. One, or both of the following keys can be designated:
"allowed" - Specifies an allowed list of event types "disallowed" - Specifies a disallowed list of event types
Further, each of those key’s value should be a JSON array that holds zero, or more JSON key/value objects. Each of these objects must contain the following key with an associated value: "type" - The type name of the event to filter
The value must be the string name (case sensitive) of the event type that needs filtering. For example:
{ \"allowed\": [ { \"type\": \"StasisStart\" }, { \"type\": \"StasisEnd\" } ] }
As this specifies only an allowed list, then only those two event type messages are sent to the application. No other event messages are sent.
The following rules apply:
- If the body is empty, both the allowed and disallowed filters are set empty.
- If both list types are given then both are set to their respective values (note, specifying an empty array for a given type sets that type to empty).
- If only one list type is given then only that type is set. The other type is not updated.
- An empty "allowed" list means all events are allowed.
- An empty "disallowed" list means no events are disallowed.
- Disallowed events take precedence over allowed events if the event type is specified in both lists.
Trait Implementations§
Source§impl Clone for FilterEventsRequest
impl Clone for FilterEventsRequest
Source§fn clone(&self) -> FilterEventsRequest
fn clone(&self) -> FilterEventsRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FilterEventsRequest
impl Debug for FilterEventsRequest
Source§impl PartialEq for FilterEventsRequest
impl PartialEq for FilterEventsRequest
Source§impl Serialize for FilterEventsRequest
impl Serialize for FilterEventsRequest
impl Eq for FilterEventsRequest
impl StructuralPartialEq for FilterEventsRequest
Auto Trait Implementations§
impl Freeze for FilterEventsRequest
impl RefUnwindSafe for FilterEventsRequest
impl Send for FilterEventsRequest
impl Sync for FilterEventsRequest
impl Unpin for FilterEventsRequest
impl UnwindSafe for FilterEventsRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.