[][src]Trait telegram_bot::prelude::ToRequest

pub trait ToRequest<'b> {
    type Request: Request;
    pub fn to_request<C>(&'b self, chat: C) -> Self::Request
    where
        C: ToChatRef
; }

Use this trait to convert a complex type to corresponding request and send it to the chat.

Associated Types

type Request: Request[src]

Request type.

Loading content...

Required methods

pub fn to_request<C>(&'b self, chat: C) -> Self::Request where
    C: ToChatRef
[src]

Convert type to request and send it to the chat.

Loading content...

Implementors

impl<'b> ToRequest<'b> for Contact[src]

type Request = SendContact<'b, 'b, 'b>

impl<'b> ToRequest<'b> for Location[src]

type Request = SendLocation

impl<'b> ToRequest<'b> for Venue[src]

type Request = SendVenue<'b, 'b, 'b>

Loading content...