Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.48 KB | None | 0 0
  1. use serde::de::Deserialize;
  2.  
  3. //  primitive telegram type
  4. pub type Integer = i64;
  5. pub type Float = f32;
  6.  
  7. #[derive(Serialize, Deserialize)]
  8. pub struct Response<T: Deserialize> {
  9.     pub ok: bool,
  10.     pub error_code: Option<Integer>,
  11.     pub description: Option<String>,
  12.     pub result: Option<T>,
  13. }
  14.  
  15. #[derive(Serialize, Deserialize)]
  16. pub struct User {
  17.     pub id: Integer,
  18.     pub firs_name: String,
  19.     pub last_name: Option<String>,
  20.     pub username: Option<String>,
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement