[][src]Trait teloxide::requests::Request

pub trait Request {
    type Output;
    fn send<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = ResponseResult<Self::Output>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Designates an API request.

Associated Types

type Output

A data structure returned if success.

Loading content...

Required methods

Important traits for Pin<P>
fn send<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ResponseResult<Self::Output>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Asynchronously sends this request to Telegram and returns the result.

Loading content...

Implementors

impl Request for AddStickerToSet[src]

type Output = True

impl Request for AnswerCallbackQuery[src]

type Output = True

impl Request for AnswerInlineQuery[src]

type Output = True

impl Request for AnswerPreCheckoutQuery[src]

type Output = True

impl Request for AnswerShippingQuery[src]

type Output = True

impl Request for CreateNewStickerSet[src]

type Output = True

impl Request for DeleteChatPhoto[src]

type Output = True

impl Request for DeleteChatStickerSet[src]

type Output = True

impl Request for DeleteMessage[src]

type Output = True

impl Request for DeleteStickerFromSet[src]

type Output = True

impl Request for DeleteWebhook[src]

type Output = True

impl Request for EditMessageCaption[src]

type Output = Message

impl Request for EditMessageLiveLocation[src]

type Output = Message

impl Request for EditMessageMedia[src]

type Output = Message

impl Request for EditMessageReplyMarkup[src]

type Output = Message

impl Request for EditMessageText[src]

type Output = Message

impl Request for ExportChatInviteLink[src]

type Output = String

Important traits for Pin<P>
fn send<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ResponseResult<String>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns the new invite link as String on success.

impl Request for ForwardMessage[src]

type Output = Message

impl Request for GetChat[src]

type Output = Chat

impl Request for GetChatAdministrators[src]

type Output = Vec<ChatMember>

Important traits for Pin<P>
fn send<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ResponseResult<Vec<ChatMember>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

On success, returns an array that contains information about all chat administrators except other bots.

impl Request for GetChatMember[src]

type Output = ChatMember

impl Request for GetChatMembersCount[src]

type Output = i32

impl Request for GetFile[src]

type Output = File

impl Request for GetGameHighScores[src]

type Output = Vec<GameHighScore>

impl Request for GetMe[src]

type Output = Me

Important traits for Pin<P>
fn send<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ResponseResult<Me>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns basic information about the bot.

impl Request for GetStickerSet[src]

type Output = StickerSet

impl Request for GetUpdates[src]

type Output = Vec<Result<Update, (Value, Error)>>

Important traits for Pin<P>
fn send<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ResponseResult<Vec<Result<Update, (Value, Error)>>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Deserialize to Vec<serde_json::Result<Update>> instead of Vec<Update>, because we want to parse the rest of updates even if our library hasn't parsed one.

impl Request for GetUserProfilePhotos[src]

type Output = UserProfilePhotos

impl Request for GetWebhookInfo[src]

type Output = WebhookInfo

impl Request for KickChatMember[src]

type Output = True

impl Request for LeaveChat[src]

type Output = True

impl Request for PinChatMessage[src]

type Output = True

impl Request for PromoteChatMember[src]

type Output = True

impl Request for RestrictChatMember[src]

type Output = True

impl Request for SendAnimation[src]

type Output = Message

impl Request for SendAudio[src]

type Output = Message

impl Request for SendChatAction[src]

type Output = True

impl Request for SendContact[src]

type Output = Message

impl Request for SendDocument[src]

type Output = Message

impl Request for SendGame[src]

type Output = Message

impl Request for SendInvoice[src]

type Output = Message

impl Request for SendLocation[src]

type Output = Message

impl Request for SendMediaGroup[src]

type Output = Vec<Message>

impl Request for SendMessage[src]

type Output = Message

impl Request for SendPhoto[src]

type Output = Message

impl Request for SendPoll[src]

type Output = Message

impl Request for SendSticker[src]

type Output = Message

impl Request for SendVenue[src]

type Output = Message

impl Request for SendVideo[src]

type Output = Message

impl Request for SendVideoNote[src]

type Output = Message

impl Request for SendVoice[src]

type Output = Message

impl Request for SetChatAdministratorCustomTitle[src]

type Output = True

impl Request for SetChatDescription[src]

type Output = True

impl Request for SetChatPermissions[src]

type Output = True

impl Request for SetChatPhoto[src]

type Output = True

impl Request for SetChatStickerSet[src]

type Output = True

impl Request for SetChatTitle[src]

type Output = True

impl Request for SetGameScore[src]

type Output = Message

impl Request for SetStickerPositionInSet[src]

type Output = True

impl Request for SetWebhook[src]

type Output = True

impl Request for StopMessageLiveLocation[src]

type Output = Message

impl Request for StopPoll[src]

type Output = Poll

Important traits for Pin<P>
fn send<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ResponseResult<Poll>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

On success, the stopped Poll with the final results is returned.

impl Request for UnbanChatMember[src]

type Output = True

impl Request for UnpinChatMessage[src]

type Output = True

impl Request for UploadStickerFile[src]

type Output = File

Loading content...