Make requester methods doc nicer

This commit is contained in:
Waffle 2020-12-28 14:46:49 +03:00
parent 7cc79eda63
commit 93bc2e6fee

View file

@ -20,7 +20,7 @@ use crate::{
pub trait Requester {
type Err: std::error::Error + Send;
// This block is auto generated by `cg` <https://github.com/teloxide/cg> (9a82143).
// This block is auto generated by `cg` <https://github.com/teloxide/cg> (de3765b).
// **DO NOT EDIT THIS BLOCK**,
// edit `cg` instead.
@ -75,42 +75,42 @@ pub trait Requester {
type SendPhoto: Request<Payload = SendPhoto, Err = Self::Err>;
/// For telegram documentation see [`SendPhoto`]
/// For Telegram documentation see [`SendPhoto`].
fn send_photo<C>(&self, chat_id: C, photo: InputFile) -> Self::SendPhoto
where
C: Into<ChatId>;
type SendAudio: Request<Payload = SendAudio, Err = Self::Err>;
/// For telegram documentation see [`SendAudio`]
/// For Telegram documentation see [`SendAudio`].
fn send_audio<C>(&self, chat_id: C, audio: InputFile) -> Self::SendAudio
where
C: Into<ChatId>;
type SendDocument: Request<Payload = SendDocument, Err = Self::Err>;
/// For telegram documentation see [`SendDocument`]
/// For Telegram documentation see [`SendDocument`].
fn send_document<C>(&self, chat_id: C, document: InputFile) -> Self::SendDocument
where
C: Into<ChatId>;
type SendVideo: Request<Payload = SendVideo, Err = Self::Err>;
/// For telegram documentation see [`SendVideo`]
/// For Telegram documentation see [`SendVideo`].
fn send_video<C>(&self, chat_id: C, video: InputFile) -> Self::SendVideo
where
C: Into<ChatId>;
type SendAnimation: Request<Payload = SendAnimation, Err = Self::Err>;
/// For telegram documentation see [`SendAnimation`]
/// For Telegram documentation see [`SendAnimation`].
fn send_animation<C>(&self, chat_id: C, animation: InputFile) -> Self::SendAnimation
where
C: Into<ChatId>;
type SendVoice: Request<Payload = SendVoice, Err = Self::Err>;
/// For telegram documentation see [`SendVoice`]
/// For Telegram documentation see [`SendVoice`].
fn send_voice<C>(&self, chat_id: C, voice: InputFile) -> Self::SendVoice
where
C: Into<ChatId>;
@ -481,14 +481,14 @@ pub trait Requester {
type EditMessageCaption: Request<Payload = EditMessageCaption, Err = Self::Err>;
/// For telegram documentation see [`EditMessageCaption`]
/// For Telegram documentation see [`EditMessageCaption`].
fn edit_message_caption<C>(&self, chat_id: C, message_id: i32) -> Self::EditMessageCaption
where
C: Into<ChatId>;
type EditMessageCaptionInline: Request<Payload = EditMessageCaptionInline, Err = Self::Err>;
/// For telegram documentation see [`EditMessageCaptionInline`]
/// For Telegram documentation see [`EditMessageCaptionInline`].
fn edit_message_caption_inline<I>(
&self,
inline_message_id: I,
@ -632,7 +632,7 @@ pub trait Requester {
type SendInvoice: Request<Payload = SendInvoice, Err = Self::Err>;
/// For telegram documentation see [`SendInvoice`]
/// For Telegram documentation see [`SendInvoice`].
fn send_invoice<T, D, Pa, P, S, C, Pri>(
&self,
chat_id: i32,
@ -680,14 +680,14 @@ pub trait Requester {
type SendGame: Request<Payload = SendGame, Err = Self::Err>;
/// For telegram documentation see [`SendGame`]
/// For Telegram documentation see [`SendGame`].
fn send_game<G>(&self, chat_id: u32, game_short_name: G) -> Self::SendGame
where
G: Into<String>;
type SetGameScore: Request<Payload = SetGameScore, Err = Self::Err>;
/// For telegram documentation see [`SetGameScore`]
/// For Telegram documentation see [`SetGameScore`].
fn set_game_score(
&self,
user_id: u32,
@ -698,7 +698,7 @@ pub trait Requester {
type SetGameScoreInline: Request<Payload = SetGameScoreInline, Err = Self::Err>;
/// For telegram documentation see [`SetGameScoreInline`]
/// For Telegram documentation see [`SetGameScoreInline`].
fn set_game_score_inline<I>(
&self,
user_id: u32,
@ -710,7 +710,7 @@ pub trait Requester {
type GetGameHighScores: Request<Payload = GetGameHighScores, Err = Self::Err>;
/// For telegram documentation see [`GetGameHighScores`]
/// For Telegram documentation see [`GetGameHighScores`].
fn get_game_high_scores<T>(&self, user_id: u32, target: T) -> Self::GetGameHighScores
where
T: Into<TargetMessage>;