Struct teloxide_core::adaptors::throttle::Limits
source · pub struct Limits {
pub messages_per_sec_chat: u32,
pub messages_per_min_chat: u32,
pub messages_per_min_channel: u32,
pub messages_per_sec_overall: u32,
}
Available on crate feature
throttle
only.Expand description
Telegram request limits.
This struct is used in Throttle
.
Note that you may ask telegram @BotSupport to increase limits for your particular bot if it has a lot of users (but they may or may not do that).
Fields§
§messages_per_sec_chat: u32
Allowed messages in one chat per second.
messages_per_min_chat: u32
Allowed messages in one chat per minute.
messages_per_min_channel: u32
Allowed messages in one channel per minute.
messages_per_sec_overall: u32
Allowed messages per second.
Trait Implementations§
source§impl Default for Limits
impl Default for Limits
Defaults are taken from telegram documentation (except for
messages_per_min_channel
).
source§impl PartialEq<Limits> for Limits
impl PartialEq<Limits> for Limits
impl Copy for Limits
impl Eq for Limits
impl StructuralEq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.