mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Fix Trace and Throttle adaptors to implement Requester
This commit is contained in:
parent
93782fba10
commit
00c6974788
2 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,7 @@ use crate::{
|
||||||
|
|
||||||
/// Request returned by [`Throttling`](crate::adaptors::Throttle) methods.
|
/// Request returned by [`Throttling`](crate::adaptors::Throttle) methods.
|
||||||
#[must_use = "Requests are lazy and do nothing unless sent"]
|
#[must_use = "Requests are lazy and do nothing unless sent"]
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct ThrottlingRequest<R: HasPayload> {
|
pub struct ThrottlingRequest<R: HasPayload> {
|
||||||
pub(super) request: Arc<R>,
|
pub(super) request: Arc<R>,
|
||||||
pub(super) chat_id: fn(&R::Payload) -> ChatIdHash,
|
pub(super) chat_id: fn(&R::Payload) -> ChatIdHash,
|
||||||
|
|
|
@ -243,6 +243,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use = "Requests are lazy and do nothing unless sent"]
|
#[must_use = "Requests are lazy and do nothing unless sent"]
|
||||||
|
#[derive(Clone)]
|
||||||
pub struct TraceRequest<R> {
|
pub struct TraceRequest<R> {
|
||||||
inner: R,
|
inner: R,
|
||||||
settings: Settings,
|
settings: Settings,
|
||||||
|
|
Loading…
Reference in a new issue