pub trait BotRequest {
type Args;
type RequestType: Serialize + Debug + Default;
type ResponseType: Serialize + DeserializeOwned + Debug + Default;
const METHOD: &'static str;
const HTTP_METHOD: HTTPMethod = HTTPMethod::GET;
// Required methods
fn get_multipart(&self) -> &MultipartName;
fn new(args: Self::Args) -> Self;
fn get_chat_id(&self) -> Option<&ChatId>;
}Expand description
Bot request trait
Required Associated Constants§
Provided Associated Constants§
const HTTP_METHOD: HTTPMethod = HTTPMethod::GET
Required Associated Types§
type Args
type RequestType: Serialize + Debug + Default
type ResponseType: Serialize + DeserializeOwned + Debug + Default
Required Methods§
fn get_multipart(&self) -> &MultipartName
fn new(args: Self::Args) -> Self
fn get_chat_id(&self) -> Option<&ChatId>
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.