#[non_exhaustive]pub enum UpdateFrequency {
Unlimited,
Limited {
updates_per_second: String,
},
Unrecognized {
literal: String,
},
}Expand description
The update rate the server has settled on for a subscription
[docs/spec/04-notifications.md §3.8].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unlimited
No limit is applied.
Limited
At most this many updates per second, per item.
Fields
Unrecognized
The rate could not be read, so do not treat it as a limit.
The server sent something that is neither unlimited nor a decimal
number [docs/spec/04-notifications.md §3.8]. It is reported rather
than dropped, and reported apart from
Limited rather than inside it, because a
caller that reads Limited { updates_per_second: "" } and divides by it
is acting on a number nobody sent. Log it, or treat the subscription’s
rate as unknown — but do not compute with it.
Trait Implementations§
Source§impl Clone for UpdateFrequency
impl Clone for UpdateFrequency
Source§fn clone(&self) -> UpdateFrequency
fn clone(&self) -> UpdateFrequency
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpdateFrequency
impl Debug for UpdateFrequency
impl Eq for UpdateFrequency
Source§impl Hash for UpdateFrequency
impl Hash for UpdateFrequency
Source§impl Ord for UpdateFrequency
impl Ord for UpdateFrequency
Source§fn cmp(&self, other: &UpdateFrequency) -> Ordering
fn cmp(&self, other: &UpdateFrequency) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for UpdateFrequency
impl PartialEq for UpdateFrequency
Source§impl PartialOrd for UpdateFrequency
impl PartialOrd for UpdateFrequency
impl StructuralPartialEq for UpdateFrequency
Auto Trait Implementations§
impl Freeze for UpdateFrequency
impl RefUnwindSafe for UpdateFrequency
impl Send for UpdateFrequency
impl Sync for UpdateFrequency
impl Unpin for UpdateFrequency
impl UnsafeUnpin for UpdateFrequency
impl UnwindSafe for UpdateFrequency
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