Trait ToRequest

Source
pub trait ToRequest<'b> {
    type Request: Request;

    // Required method
    fn to_request<C>(&'b self, chat: C) -> Self::Request
       where C: ToChatRef;
}
Expand description

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

Required Associated Types§

Source

type Request: Request

Request type.

Required Methods§

Source

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

Convert type to request and send it to the chat.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'b> ToRequest<'b> for Contact

Source§

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

Source§

impl<'b> ToRequest<'b> for Location

Source§

impl<'b> ToRequest<'b> for Venue

Source§

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