Trait teloxide_core::requests::Payload
source · pub trait Payload {
type Output;
const NAME: &'static str;
// Provided method
fn timeout_hint(&self) -> Option<Duration> { ... }
}
Expand description
Payload of a request.
Simply speaking, structures implementing this trait represent arguments of a Telegram bot API method.
Also, this trait provides some additional information needed to send a request to Telegram.
Required Associated Types§
Required Associated Constants§
Provided Methods§
sourcefn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g. GetUpdates
with
big timeout
), the minimum timeout that should be used.