Trait teloxide::requests::Payload[][src]

pub trait Payload {
    type Output;

    pub const NAME: &'static str;
}

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.

Associated Types

type Output[src]

The return type of a Telegram method.

Note: it should not include Result wrappers (e.g. it should be simply Message, True or something else).

Loading content...

Associated Constants

pub const NAME: &'static str[src]

Name of a Telegram method.

It is case insensitive, though must not include underscores. (e.g. GetMe, GETME, getme, getMe are ok, but get_me is not ok).

Loading content...

Implementors

impl Payload for AddStickerToSet[src]

type Output = True

impl Payload for AnswerCallbackQuery[src]

type Output = True

impl Payload for AnswerInlineQuery[src]

type Output = True

impl Payload for AnswerPreCheckoutQuery[src]

type Output = True

impl Payload for AnswerShippingQuery[src]

type Output = True

impl Payload for Close[src]

type Output = True

impl Payload for CopyMessage[src]

type Output = Message

impl Payload for CreateChatInviteLink[src]

type Output = ChatInviteLink

impl Payload for CreateNewStickerSet[src]

type Output = True

impl Payload for DeleteChatPhoto[src]

type Output = String

impl Payload for DeleteChatStickerSet[src]

type Output = True

impl Payload for DeleteMessage[src]

type Output = True

impl Payload for DeleteStickerFromSet[src]

type Output = True

impl Payload for DeleteWebhook[src]

type Output = True

impl Payload for EditChatInviteLink[src]

type Output = String

impl Payload for EditMessageCaption[src]

type Output = Message

impl Payload for EditMessageCaptionInline[src]

type Output = True

impl Payload for EditMessageLiveLocation[src]

type Output = Message

impl Payload for EditMessageLiveLocationInline[src]

type Output = Message

impl Payload for EditMessageMedia[src]

type Output = Message

impl Payload for EditMessageMediaInline[src]

type Output = True

impl Payload for EditMessageReplyMarkup[src]

type Output = Message

impl Payload for EditMessageReplyMarkupInline[src]

type Output = True

impl Payload for EditMessageText[src]

type Output = Message

impl Payload for EditMessageTextInline[src]

type Output = True

impl Payload for ExportChatInviteLink[src]

type Output = String

impl Payload for ForwardMessage[src]

type Output = Message

impl Payload for GetChat[src]

type Output = Chat

impl Payload for GetChatAdministrators[src]

type Output = ChatMember

impl Payload for GetChatMember[src]

type Output = ChatMember

impl Payload for GetChatMembersCount[src]

type Output = u32

impl Payload for GetFile[src]

type Output = File

impl Payload for GetGameHighScores[src]

type Output = True

impl Payload for GetMe[src]

type Output = Me

impl Payload for GetMyCommands[src]

type Output = u32

impl Payload for GetStickerSet[src]

type Output = StickerSet

impl Payload for GetUpdates[src]

type Output = Vec<Update, Global>

impl Payload for GetUpdatesFaultTolerant[src]

type Output = SemiparsedVec<Update>

impl Payload for GetUserProfilePhotos[src]

type Output = UserProfilePhotos

impl Payload for GetWebhookInfo[src]

type Output = WebhookInfo

impl Payload for KickChatMember[src]

type Output = True

impl Payload for LeaveChat[src]

type Output = String

impl Payload for LogOut[src]

type Output = True

impl Payload for PinChatMessage[src]

type Output = String

impl Payload for PromoteChatMember[src]

type Output = True

impl Payload for RestrictChatMember[src]

type Output = True

impl Payload for RevokeChatInviteLink[src]

type Output = String

impl Payload for SendAnimation[src]

type Output = Message

impl Payload for SendAudio[src]

type Output = Message

impl Payload for SendChatAction[src]

type Output = Message

impl Payload for SendContact[src]

type Output = Message

impl Payload for SendDice[src]

type Output = Message

impl Payload for SendDocument[src]

type Output = Message

impl Payload for SendGame[src]

type Output = Message

impl Payload for SendInvoice[src]

type Output = Message

impl Payload for SendLocation[src]

type Output = Message

impl Payload for SendMediaGroup[src]

type Output = Vec<Message, Global>

impl Payload for SendMessage[src]

type Output = Message

impl Payload for SendPhoto[src]

type Output = Message

impl Payload for SendPoll[src]

type Output = Message

impl Payload for SendSticker[src]

type Output = Message

impl Payload for SendVenue[src]

type Output = Message

impl Payload for SendVideo[src]

type Output = Message

impl Payload for SendVideoNote[src]

type Output = Message

impl Payload for SendVoice[src]

type Output = Message

impl Payload for SetChatAdministratorCustomTitle[src]

type Output = True

impl Payload for SetChatDescription[src]

type Output = String

impl Payload for SetChatPermissions[src]

type Output = True

impl Payload for SetChatPhoto[src]

type Output = String

impl Payload for SetChatStickerSet[src]

type Output = True

impl Payload for SetChatTitle[src]

type Output = String

impl Payload for SetGameScore[src]

type Output = Message

impl Payload for SetGameScoreInline[src]

type Output = Message

impl Payload for SetMyCommands[src]

type Output = u32

impl Payload for SetPassportDataErrors[src]

type Output = True

impl Payload for SetStickerPositionInSet[src]

type Output = True

impl Payload for SetStickerSetThumb[src]

type Output = True

impl Payload for SetWebhook[src]

type Output = True

impl Payload for StopMessageLiveLocation[src]

type Output = Message

impl Payload for StopMessageLiveLocationInline[src]

type Output = Message

impl Payload for StopPoll[src]

type Output = Poll

impl Payload for UnbanChatMember[src]

type Output = True

impl Payload for UnpinAllChatMessages[src]

type Output = String

impl Payload for UnpinChatMessage[src]

type Output = String

impl Payload for UploadStickerFile[src]

type Output = File

Loading content...