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 Constants§
Required Associated Types§
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.