mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
impl Clone
for {CacheMe<_>
, DefaultParseMode<_>
, Throttle<_>
}
This commit is contained in:
parent
8cd8ac96d9
commit
44a044af02
4 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- `impl Clone` for {`CacheMe<_>`, `DefaultParseMode<_>`, `Throttle<_>`} ([#75][pr75])
|
||||
|
||||
[pr75]: https://github.com/teloxide/teloxide-core/pull/75
|
||||
|
||||
### Fixed
|
||||
|
||||
- `GetChatAdministrators` output type `ChatMember` => `Vec<ChatMember>` ([#73][pr73])
|
||||
|
|
|
@ -18,6 +18,7 @@ use crate::{
|
|||
///
|
||||
/// Bot's user is hardly ever changed, so sometimes it's reasonable to cache
|
||||
/// response from `get_me` method.
|
||||
#[derive(Clone)]
|
||||
pub struct CacheMe<B> {
|
||||
bot: B,
|
||||
me: Arc<OnceCell<Me>>,
|
||||
|
|
|
@ -6,6 +6,7 @@ use crate::{
|
|||
|
||||
/// Default parse mode adaptor, see
|
||||
/// [`RequesterExt::parse_mode`](crate::requests::RequesterExt::parse_mode).
|
||||
#[derive(Clone)]
|
||||
pub struct DefaultParseMode<B> {
|
||||
bot: B,
|
||||
mode: ParseMode,
|
||||
|
|
|
@ -146,6 +146,7 @@ impl Default for Limits {
|
|||
///
|
||||
/// As such, we encourage not to use `ChatId::ChannelUsername(u)` with this bot
|
||||
/// wrapper.
|
||||
#[derive(Clone)]
|
||||
pub struct Throttle<B> {
|
||||
bot: B,
|
||||
// `RequestLock` allows to unlock requests (allowing them to be sent).
|
||||
|
|
Loading…
Reference in a new issue