Struct telegram_bot::types::Response [−][src]
pub struct Response<T: Decodable> { pub ok: bool, pub error_code: Option<Integer>, pub description: Option<String>, pub result: Option<T>, }
All API responses are from this type. Mostly used internal.
Fields
ok: bool
error_code: Option<Integer>
description: Option<String>
result: Option<T>
Trait Implementations
impl<T: Decodable + Decodable> Decodable for Response<T>
[src]
impl<T: Decodable + Decodable> Decodable for Response<T>
fn decode<__DT: Decoder>(d: &mut __DT) -> Result<Response<T>, __DT::Error>
[src]
fn decode<__DT: Decoder>(d: &mut __DT) -> Result<Response<T>, __DT::Error>
Deserialize a value using a Decoder
.
impl<T: Debug + Decodable> Debug for Response<T>
[src]
impl<T: Debug + Decodable> Debug for Response<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: PartialEq + Decodable> PartialEq for Response<T>
[src]
impl<T: PartialEq + Decodable> PartialEq for Response<T>
fn eq(&self, other: &Response<T>) -> bool
[src]
fn eq(&self, other: &Response<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Response<T>) -> bool
[src]
fn ne(&self, other: &Response<T>) -> bool
This method tests for !=
.
impl<T: Clone + Decodable> Clone for Response<T>
[src]
impl<T: Clone + Decodable> Clone for Response<T>