Merge branch 'docs-gardening' of https://github.com/teloxide/teloxide-core into docs-gardening

This commit is contained in:
Temirkhan Myrzamadi 2020-12-23 23:41:27 +06:00
commit 957c997161
3 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ pub trait HasPayload
// we wanted to use As{Mut,Ref} here, but they doesn't work // we wanted to use As{Mut,Ref} here, but they doesn't work
// because of https://github.com/rust-lang/rust/issues/77010 // because of https://github.com/rust-lang/rust/issues/77010
{ {
/// A type of the payload contained. /// The type of the payload contained.
type Payload: Payload; type Payload: Payload;
/// Gain mutable access to the underlying payload. /// Gain mutable access to the underlying payload.

View file

@ -3,11 +3,11 @@
/// Simply speaking, structures implementing this trait represent arguments of /// Simply speaking, structures implementing this trait represent arguments of
/// a Telegram bot API method. /// a Telegram bot API method.
/// ///
/// Also, this trait provides some additional information needed for sending a /// Also, this trait provides some additional information needed to send a
/// request to Telegram. /// request to Telegram.
#[cfg_attr(all(docsrs, feature = "nightly"), doc(spotlight))] #[cfg_attr(all(docsrs, feature = "nightly"), doc(spotlight))]
pub trait Payload { pub trait Payload {
/// A return type of a Telegram method. /// The return type of a Telegram method.
/// ///
/// Note: it should not include `Result` wrappers (e.g. it should be simply /// Note: it should not include `Result` wrappers (e.g. it should be simply
/// [`Message`], [`True`] or something else). /// [`Message`], [`True`] or something else).

View file

@ -23,10 +23,10 @@ pub trait Request: HasPayload {
* use it before it's integrated in async/await * use it before it's integrated in async/await
*/ */
/// A type of an error that may happen while sending a request to Telegram. /// The type of an error that may happen while sending a request to Telegram.
type Err: std::error::Error + Send; type Err: std::error::Error + Send;
/// A type of the future returned by the [`send`](Request::send) method. /// The type of the future returned by the [`send`](Request::send) method.
type Send: Future<Output = Result<Output<Self>, Self::Err>> + Send; type Send: Future<Output = Result<Output<Self>, Self::Err>> + Send;
/// A type of the future returned by the [`send_ref`](Request::send_ref) /// A type of the future returned by the [`send_ref`](Request::send_ref)