pub struct EventMask {
pub connected: ConnectMode,
pub get: RequestMode,
pub get_many: RequestMode,
pub push: RequestMode,
pub observe: ObserveMode,
pub throttle: ThrottleMode,
}Expand description
Event mask to configure which events are sent to the event handler.
This can also be used to completely disable certain request types. E.g. push requests are disabled by default, as they can write to the local store.
Fields§
§connected: ConnectModeConnection event mask
get: RequestModeGet request event mask
get_many: RequestModeGet many request event mask
push: RequestModePush request event mask
observe: ObserveModeObserve request event mask
throttle: ThrottleModethrottling is somewhat costly, so you can disable it completely
Implementations§
Source§impl EventMask
impl EventMask
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
All event notifications are fully disabled. Push requests are disabled by default.
Sourcepub const ALL_READONLY: Self
pub const ALL_READONLY: Self
All event notifications for read-only requests are fully enabled.
If you want to enable push requests, which can write to the local store, you need to do it manually. Providing constants that have push enabled would risk misuse.
Trait Implementations§
impl Copy for EventMask
impl Eq for EventMask
impl StructuralPartialEq for EventMask
Auto Trait Implementations§
impl Freeze for EventMask
impl RefUnwindSafe for EventMask
impl Send for EventMask
impl Sync for EventMask
impl Unpin for EventMask
impl UnwindSafe for EventMask
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.