Struct teloxide_core::requests::JsonRequest[][src]

#[must_use = "requests do nothing until sent"]pub struct JsonRequest<P> { /* fields omitted */ }

A ready-to-send Telegram request whose payload is sent using JSON.

Implementations

impl<P> JsonRequest<P>[src]

pub const fn new(bot: Bot, payload: P) -> Self[src]

Trait Implementations

impl<P: Payload + Serialize> Deref for JsonRequest<P>[src]

type Target = P

The resulting type after dereferencing.

impl<P: Payload + Serialize> DerefMut for JsonRequest<P>[src]

impl<P> HasPayload for JsonRequest<P> where
    P: Payload
[src]

type Payload = P

The type of the payload contained.

impl<P> Request for JsonRequest<P> where
    P: 'static,
    P: Payload + Serialize,
    P::Output: DeserializeOwned
[src]

type Err = RequestError

The type of an error that may happen while sending a request to Telegram. Read more

type Send = Send<P>

The type of the future returned by the send method.

type SendRef = SendRef<P>

A type of the future returned by the send_ref method. Read more

Auto Trait Implementations

impl<P> !RefUnwindSafe for JsonRequest<P>

impl<P> Send for JsonRequest<P> where
    P: Send

impl<P> Sync for JsonRequest<P> where
    P: Sync

impl<P> Unpin for JsonRequest<P> where
    P: Unpin

impl<P> !UnwindSafe for JsonRequest<P>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,